Object Oriented Software Development 2. C# object oriented programming basics.
Towards a General Object-Oriented Software
-
Upload
janschwarzz -
Category
Documents
-
view
221 -
download
0
Transcript of Towards a General Object-Oriented Software
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 1/15
N89-16330
T O W A R D S A G E N E R A L O B J E C T - O R I E N T E DS O F TW A R E D E V E L O P M E N T M E T H O D O LO G Y
E d S e i d e w i t z / C o d e 5 5 4M i k e S t a r k / C o d e 5 5 2
G o d d a r d S p a c e F l i g h t C e n t e rG r e e n b e l t , M D 2 0 7 7 1
1. I N T R O D U C T I O N
A n o b j e c t i s a n a b s t r a c t s o f t w a r e mo d e l o f a p r o b l e m d o m a i ne n t it y . O b j e c t s a r e p a c k a g e s o f b o t h d a t a a n d o p e r a t i o n s o nt h a t d a t a [ G o l d b e r g 8 3 , B o o c h 8 3 1. T h e xaa ( t m ) p a c k a g ec o n s t r u c t i s r e p r e s e n t a t i v e o f t h i s g e ne r a l n o t i o n o f a n o b je c t.--b J e c t - o r i e n t e d________-- - ----e s i g n i s t h e t e c h n i q u e o f u s in g o b j e c t s a s t h eb a s i c u n i t o f m o d u l a r i t y i n s y s t e m d e s ig n . T h e S o f t w a r eE n g i n e e r i n g L a b o r a t o r y a t t h e G o dd a r d S p a c e F l i g h t C e n t e r - i sc u r r e n t l y i n v o l v e d i n a p i l o t p r o j e c t t o d e v e l o p a f l i g h t
d y n a m i c s s i m u l a t o r in A d a ( a p p r o x i m a t e l y 4 0 , 0 0 0 s t a t e m e n t s )u s i n g o b j e c t - o r i e n t e d m e t h o d s . S e v e r a l a u t h o r s h a v e a p p l i e do b j e c t - o r i e n t e d c o n c e p t s t o A d a (e.g., [ B o o c h 8 3 , C h e r r y 8 5 bl ).In o u r e x p e r i e n c e w e h a v e f o u nd t h e s e m e t h o d o l o g i e s l i m i t e d[ N e l s o n 861. A s a r e s u l t w e h a v e s y n t h e s i z e d a m o r e g e n e r a la p p r o a c h w h i c h a l l o w s a d e s i g n e r t o a p p l y p o w e r f u l ,o b j e c t - o r i e n t e d p r i n c i p l e s t o a w i d e r a n g e o f a p p l i c a t i o n s a nda t a ll s t a g e s o f d e s ig n . T h e p r e s e n t p a p e r p r o v i d e s an o v e r v i e wo f o u r a p p ro a c h. F u r th e r , w e a l s o c o n s i d e r h o w o b j e c t - o r i e n t e dd e s i g n f i t s i n t o t h e o v e r al l s o f t w a r e l if e - c y c l e .
2 . O B J E C T S A N D O B J E C T D I A G R A M S
W e c a n m o d e l a p r o c e d u r e------- a s a m a t h e m a t i c a l f u n c t i o n . T h a ti s, g i v e n a c e r t a i n s e t o f i n p u t s ( a r g u m e n t s an d g l o b a l d a t a) , ap r o c e d u r e a l w a y s p r o d u c e s t h e s a m e s e t o f o u t p u t s ( r e s u l t s a ndglobal updates). A procedure, for--exampTey c a n n o t directly
m o d el a n a d d r e s s b o o k , b e c a u s e a n a d d r e s s b o o k h a s -----e m o r y ( a s e to f a d d r e s s e s ) w h i c h c a n b e a c c e s s e d a n d u p d at e d . N o r m a l l y , t h es o l u t i o n t o t h i s i s t o p l a c e s u c h m e m o r y i n g l o b a l v a r i a b l e s .
F i g u r e 1 g i v e s a r e p r e s e n t a t i o n o f t h e a b o v e s i t ua t i on .T h i s d i a g r a m u s e s a n o t a t i o n s i m i l a r t o [ Y o ur d o n 791 t o s h o wb o t h d a t a a n d c o n t r o l f l o w. T h e a r r o w f r o m C A L L E R t o P R O C E D U R Ei n d i c a t e s t h a t C A L L E R t r a n s f e r s c o n tr o l t o PR O C ED U R E. N o t e t h a tt h e r e i s a n i m p l i c i t r e t u r n o f c o n tr o l w h e n P R O C E D U R E f in i s he s .T h e s m a l l e r a r r o w s i n -T ig u? e T-sEow-iEe d a t a f l o w s , w h i c h m a y g oi n e i t h e r d i r e c t i o n a l o n g t h e c o n t r o l a r r ow . A l s o , f i g u r e 1
i n c l u d e s a n e x p l i c i t s y mb o l f o r t h e G L O B A L D A TA . C o n t r o l a r r o w sd i r e c t e d t o w a r d s t h i s s y m bo l d e n o t e d a t a a c c e s s , e v e n t h o u g hc o n tr o l n e v e r r e a l l y f l o w s i n t o t h e d a t a , o f c o ur s e . T h i sc o n v e n t i o n i n d i c a t e s t h a t t h e d a t a i s a l w a y s p a s s i v e a nd n e v e r---------n i t i a t e s a n y a c t i o n .
D.4.6.1
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 2/15
I
2GLOBALDATA
FIGURE1 A p r o c e d u r e d
T h e u s e o f g l ob a l
ADDRESS
MEMORY
STATE)@JTEwI(AL
FIGURE 2 An ADDRESS BOOK object
s t o r a g e l e a v e s d a t a o p e n t o i l l i c i tm o d i f i c a t i o n . T o - a v o i d t h i s , - a n o b j e c t p a c k a g e s s o m e m e m o r y
t o g e t h e r w i t h a ll a l l o w a b l e o p e r a t i o n s o n i t. W e c a n m o d el ano b j e c t a s a m a t h e m a t i c a l " s t a t e m a c h i n e " w i t h s o m e i n t e rn a ls t a t e w h i c h c a n b e a cc e s s e d a n d m o d i f i e d b y a l i m i t e d n u m b e r o fm a t h e m a t i c a l f u n c t i o n s . W e t h u s i m p l e m e n t a n o b j e c t a s ap a c k a g e d s e t o f p r o c e d u r e s a n d i n t e r n a l d a t a , a s s h o w n i nf i g u r e 2. F o r a n a d d r e s s b o o k o b j e c t , t h e i n t e r n al m e m o r y w o u l db e a s e t o f a d d r e s s e s , a n d t h e a l l o w a b l e o p e r a t i o n s w o u l d b ea c c e s s i n g a n a d d r e s s b y n a m e , a d d i n g a n a d d r e s s , e t c. U n l i k e ap r o ce d u re , t h e s a m e a r g u m e n t s t o a n o b j e c t op e r a t i o n m a y p r o d u c e---------i f f e r e n t r es ul fs -- at d i f f e r e n t t i m e s , d e p e n d i n g o n t h e h i d d e ni n t e r n a l s t a t e . W e will d i a g r a m a n o b j e c t s h o w i n g o n l y i t so p e r a t i o n a l c o n n e c t i o n s t o o t h e r o b j e c t s , a s i n t h e --b i e c t-----i a g r a m-- o f f i g u r e 3 [ S e i d e w i t z 8 5a ].
W h e n t h e r e a r e s e v e r a l c o n t r o l p a t h s o n a c o m p l i c a t e do b j e c t d i a g r a m , i t r a p i dl y b e c o m e s c u m b e r s o m e t o s h o w d a t a f l o w so r a ll i nd i v i d u a l p r o c e d u r e c o n t r o l f l o ws . T h e r e f o r e , a n a r r o wb e t w e e n o b j e c t s o n a n o b j e c t d i a g r a m i n d i c a t e s t h a t o n e o b j e c ti n v o k e s ---n e --r ----o r e o f t h e o p e r a t i o n s p r o v id e d by a n o t h e r o b j e c ta n d i s n o t m a r k e d w i t h d a t a f l o w a r r ow s . --b i e c t-- ------e s c r i g t i o n s-_-_f o r e a c h o b j e c t o n a d i a g r a m p r o v i d e d e t a i l s o f t h e d a t a fl o w.A n o b j e c t d e s c r i p t i o n i n c l u d e s a l i s t o f al l o p e r a t i o n s p ro v i d e dby a n o b j e c t a n d , f o r e a c h a r r o w l e a v i n g t h e o b j e c t , a l i s t o fo p e r a t i o n s u s ed f r o m a n o t h e r o b j ec t . F o r e x a m p l e , t h e o b j ec t
0 . 4 . 6 . 2
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 3/15
-* --d e s c r i p t i o n f o r DATE BOOK f r o m f i g u r e 3 i s :
P r o v i d e s :N e x t - A p p o i n t m e n t ( ) N A M E t A D D R E S SG e t A p p o i n t m e n t (D AT E t T I M E ) N A M E + A D D R E S SM a k e A p p o i n t m e n t (D AT E + T I M E + N A M E )C a n c e l - A p p o i n t m e n t ( D A T E + T I M E )
U s e s :
A D D R E S S BOOK
Look-Up
CLOCKG e t D a t eG e t - T i m e
D a t a i n p a r e n t h e s e s a r e a r g u m e n t s w h i c h f l o w a l o n g t h e c o n t r o la r r o w , w h i l e u n p a r e n t h e s i z e d d a t a a r e r e s u l t s w h i c h a r er e t u r n e d .
FIGURE 3 A simple schedule organ izer
D.
FIGURE 4 Parent-child hierarchy
4 . 6 . 3
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 4/15
3. O B J E C T - O R I E N T E D D E S I G N -
T h e i n t e n t o f a n o b j e c t i s t o r e p r e s e n t a p r o b l e m d o m a i ne n t i t y. T h e c o n c e p t o f a b s t r a c t i o n d e a l s w i t h h o w a n o b j e c tp r e s e n t s t h i s r e p r e s e n t a t i o n t o o t h e r o b j e c t s [ D i j k s t r a 6 8 ,L i s k o v 7 4 , B o oc h 8 3 1 . T h e r e is a s p e c t r u m o f a b s t r a c t i o n , f r o m
o b j e c t s w h i c h c l o s e l y m o de l p r o b le m d o m a i n e n t i t i e s t o o b j e c t sw h i c h r e a l l y h a ve n o r e a s o n f o r e x i s t e n c e . T h e f o l l o w i n g a r es o m e p o i n t s i n t h i s s c a l e :
B e s t
I-----n t i t y __----__---b s t r a c t i o n - A n o b j e c t r e p r e s e n t s a u s e fu lm o de l o f a p r o b l e m d o m a i n e n t i t y .
------c t i o n --___------b s t r a c t i o n - A n o b j e c t p r o v i d e s a g e n e r a l i z e ds e t o f o p e r a t i o n s w h i c h a ll p e r f o r m t h e s a m e k i nd o ff u n c t i o n .
_____- -i r t u a l -------a c h i n e A b s t r a c t i o n - A n o b j e c t g r o u p st oc te th er o D e r a t i o n s w h i c h a r e a ll u s e d by s o m e
s u k e r i o r le v el o f c o n tr o l o r a ll u s e s o m e j u n i o r l e ve ls e t o f o p e r a t i o n s .
_____ - -_____o i n c i d e n t a l _-__---------A b s t r a c t i o n " - A n o b j e c t p a c k a g e s a s e to f o p e r a t i o n s w h i c h h a v e n o r e l a t i o n t o e a c h o t h e r .
T h e s t r o n g e r t h e a b s t r a c t i o n o f a n o b j e c t , t h e m o r e d e t a i l s a r es u p p r e s s e d b y t h e a b s t r a c t c o n c e p t . T h e p r i n c i p l e o f____-------n f o r m a t i o n -----i d i n g s t a t e s t h a t s u c h d e t a i l s s h o u l d b e k ep ts e c r e t f r o m o t h e r o b j e c t s [ P a r n a s 7 2 , B o o c h 8 3 1 , s o a s t o b e t t e rp r e s e r v e t h e a b s t r a c t i o n m o d e l e d b y t h e o b j e c t .
T h e p r i n c i p l e s o f a b s t r a c t i o n a nd i n f o r m a t i o n h i d i n gp r o v i d e t h e m a i n g u i d e s f o r c r e a t i n g " g o o d " o b je c ts . T h e s eo b j e c t s m u s t t h e n b e c o n n e c t e d t o g e t h e r t o f o r m a no b j e c t - o r i e n t e d d e s i g n [ S e i d e w i t z 8 5 b l . F o l l o w i n g [ R a j l i c h 8 5 1 ,w e c o n s i d e r t w o o r th o g o n a l h i e r a r c h i e s i n s o f t w a r e s y s t e md e s i g n s . T h e p a r e n t - c h i l d---------- h i e r a r c h y d e a l s w i t h t h ed e c o m p o s i t i o n o f l a r g e r o b j e c t s i n to s m a l l e r c o m p o n e n t o b j ec t s .T h e _____---e n i o r i t y h i e r a r c h y d e a l s w i t h t h e o r g a n i z a t i o n o f a s e t o fo b j e c t s i n t o " l a y e rs " . E a c h l a y e r d e f i n e s a -------i r t u a l -------a c h i n ew h i c h p r o v i d e s s e r v i c e s t o s e n i o r l a y e r s [ D i j k s t r a 681. A m a j o rs t r e n g t h o f o b j e c t d i a g r a m s i s t h a t t h e y c a n d i s t i n c t l yr e p r e s e n t t h e s e h i e r a r c h i e s.
T h e p a r e n t - c h i l d h i e r a r c h y i s d i r e c t l y e x p r e s s e d by_____ - -e v e l i n g o b j e c t d i a g r a m s ( s e e f i g u r e 4). A t i t s t o p l e v e l , a n yc o m p l e t e s y s t e m m a y b e r e p r e s e n t e d b y a s i n g l e o b j e c t . F o re x a m p l e , f i g u r e 5 s h o w s a d i a g r a m o f t h e c o m p l e t e S C H E D U L EO R G A N I Z E R o f t h e l a s t s e c t i o n . T h e o b j e c t S C H E D U L E O R G A N I Z E Rr e p r e s e n t s t h e ''parent" o f t h e c o m p l e t e o b j e c t d i a g r a m o ff i g u r e 3. T h e b o xe s l a b e l e d " U S E R " a n d " C L O C K " a r e --------x t e r n a l--------n t i t i e s o b j e c t s w h i c h a r e n o t i n c l u d e d i n t h e s y s t e m , b utw h i c h c o m m u n i c a t e s w i th t h e top l e v el s y s t e m o b j e c t . N o t e t h ea r r o w l a b e l e d '*RUN". B q c o n v e n t i o n , RU N i s t h e o p e r a t i o n u se dt o i n i t i a l l y i n v o k e t h e e n t i r e s y s t e m .
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 5/15
7-
J
VIRNAl.
MACHIM
XNTEFtFACE 1
IVlRTUAL
MACHINE
N E I F A C E 2
FIGURE5 External Entities Diagram FIGURE 6 Seniority hierarchy
F i g u r e 3 i s t h e d e c o m p o si t i o n o f t h e S C H E D U L E O R G A N I Z ER o ff i g u r e 5. B e g i n n i n g a t t h e s y s t e m l e v e l , e a c h o b j e c t c a n b er e f i n e d i n t h i s w a y i n t o a l o w e r l e ve l o b j e c t d i a g r a m . T h e
r e s u l t i s a l e v e l e d s e t o f o b j e c t d i a g r a m s w h i c h c o m p l e t e l yd e s c r i b e t h e s t r u c t u r e o f a s y st em . A t t h e l o w e s t l e v e l ,o b j e c t s a r e c o m p l e t e l y d e c o m p o s e d i n t o FrrJmitive----- --b i e c t s ,---
p r o c e d u r e s a n d i n t e r n a l s t a t e d a t a s t o r e s, r e s u l t i n g i n d i a g r a m ss i m i l a r to f i g u r e 2.
T h e s e n i o r i t y h i e r a r c h y i s e x p r e s s e d b y t h e t o p o l o g y o fc o n n e c t i o n s o n a s i n g l e o b j e c t d i a g r a m ( s e e f i g u r e 6). A n yl a y e r i n a s e n i o r i t y h i e r a r c h y c a n c a l l o n a n y o p e r a t i o n i nj u n i o r l a y e r s , b ut -----e v e r a n y o p e r a t i o n in a s e n i o r l a y e r . T h u s ,all c y c l i c r e l a t i o n s h i p s b e t w e e n o b j e c t s m u s t b e c o n t a i n e dw i t h i n a v i r t ua l m a c h i n e l a y e r . O b j e c t d i a g r a m s a re d r a w n w i t ht h e s e n i o r i t y h i e r a r c h y s h o w n v e r t i c a l l y . E a c h s e n i o r o b j e c t
c a n b e d e s i g n e d a s if t h e o p e r a t i o n s p r o v i d e d b y j u n i o r l a y e r sw e r e " p r i m i t i v e o p er at io ns '' i n a n e x t e n d e d l a n g u a g e . E a c hv i r t ua l m a c h i n e l a y e r w i ll g e n e r a l l y c o n t a i n s e v e ra l o b j e c t s ,e a c h d e s i g n e d a c c o r d i n g t o t h e p r i n c i p l e s o f a b s t r a c t i o n a ndi n f o r m a t i o n h i d i n g .
T h e m a i n a d v a n t a g e o f a s e n i o r i t y h i e r a r c h y i s t h a t i tr e d u c e s t h e c o u p l i n g b e t we e n o b j e c t s . T h i s i s b e c a u s e a llo b j e c t s i n o n e v i r tu a l m a c h i n e l a y e r n e ed t o k n o w n o t h i n g a b o u ts e n i o r l a y e rs . F u r t h e r , t h e c e n t r a l i z a t i o n o f t h e p r o c ed u r a l
D.4.6.5
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 6/15
a n d d a t a f l o w c o n tr o l i n s e n i o r o b j e c t s c a n m a k e a s y s t e m e a s i e rt o u n d er s t a n d a n d m o d i f y . H o w e v e r , t h i s v er y c e n t r a l i z a t i o n - ca nc a u s e a m e s s y b o t t l e n e c k . I n s u c h c a s e s , t h e c o m p l e x i t y o fs e n i o r l e v e l s c a n b e t r a d e d o f f a g a i n s t t h e c o u p l i n g o f j u n i o rl e v e l s . T h e i m p o r t a n t p o i n t i s t h a t t h e s t r e n g t h o f t h es e n i o r i t y h i e r a r c h y i n a d e s i g n c a n b e c h o s e n f r o m a -p e c t r u m----- o f
p o s s i b i l i t i e s , w i t h t h e b e s t d e s i g n g e n e r a l l y l y i n g b e t w e e n t h ee x t r e m e s . T h i s g i v e s t h e d e s i g n e r g r e a t p o w e r a nd f l e x i b i l i t yi n a d a p t i n g s y s t e m d e s i g n s t o s p e c i f i c a p p l i c a t i o n s .
I n t h e s i m p l e a u t o m a t e d p l an t s i m u l a t i o n s y s t e m s h o w n i nf i g u r e 7 , t h e j u n i o r l e v e l c o m p o n e n t s d o n o t i n t er a c t d i r e c t l y .T h i s d e s i g n i s s o m e w h a t l i k e a n o b j e c t - o r i e n t e d v e r s i o n o f t h es t r u c t u r e d d e s i g n s o f [ Y o u r d o n 791. W e c a n r e m o v e t h e d a t a f l o wc o n t r o l f r o m t h e s e n i o r o b j e c t a nd l e t t h e j u n i o r o b j e c t s p a s sd a t a d i r e c t l y b e t w e e n t h e m s e l v e s , u s i n g o p e r a t i o n s w i t h i n t h ev i rt u al m a c h i n e l a y e r ( s e e f i g u r e 8). T h e s e n i o r o b j e c t h a sb e en r e d u c e d t o s i m p l y a c t i v a t i n g v a r i o u s o p e r a t i o n s i n t h ev i r t ua l m a c h i n e l a y e r , w i t h v e r y l i t t l e d a t a f l o w. W e c a n e v e n
r e m o v e t h e s e n i o r o b j e c t c o m p l e t e l y b y d i s t r i b u t i n g c o n t r o la m o n g t h e j u n i o r l e ve l o b j e c t s ( s e e f i g u r e 9). T h e s p l i t t i n g o ft h e R U N c o n t r o l a r r o w i n f i g u r e 1 1 m e a n s t h a t t h e t h r e e o b j e c t sa r e a c t i v a t e d s i m u l t a n e o u s l y a nd t h a t t h e y r u n c o n c u r r e n t l y .T h e s e n i o r i t y h i e r a r c h y h a s c o l l a p s e d , l e a v i n g a h o m o l o g o u s o rn o n - h i e r a r c h i c a l d e s i q n f Y o u r d o n 7 9 1 ( n o s e n i o ri t y - - bT e r a rc h y ,
h i e r a r c h y s t i l l r e m a i n s ) . A d e s i g nh a t i s ; t h e p a r e n t - c h i l dw h i c h i s h o m o l o g o u s a t al lt o w h a t w o u l d b e p r o d u c e d[ C h e r r y 8 5 a , C h e r r y 8 5 b l .
d e c o m p o s i t i o n l e v e l s i s v e r y s i m i l a rb y t h e P A M E L A ( t m ) m e t h o d o l o g y o f
FIGURE 7 A simple plant automation FIGURE8 plant simulator with
simulation system junior-level connections
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 7/15
FIGURE9
FIGURE10 EMS
Plant simulator, homologous design -context diagram
4 . OBJECT-ORIENTED LIFE CYCLE
Object diagrams and the object-oriented design conceptsdiscussed above can be used as part of an object-oriented lifecycle. To do this, we must show that a specification can be
translated into object diagrams , and that object diagrams mapreadily into Ada. We use structured analysis for developing thespecification [DeMarco 791. The data flow diagrams of astructured specification provide a levele d, graphical notationcontaining the information needed to represent abstractentities, but in a form emphasizing data flow and datatransformation.
_--________bstraction - -_-nalysis_- is the process of making a transitionfrom a structured specification to an object-o riented design[Stark 861. We will use a simplified version of an ElectronicMessage System ( E M S ) as an example o f abstraction analysis.Figure 1 0 is the context diagram for EMS, and Figure 11 is the
level 0 data flo w diagram. EMS must allow the user to send,read, and respond to messages, to obtain a directory o f valid
users to which messages can be sent, and to add and delete usersfrom that directory.
The first step of abstraction analysis i s to find a central
-----ntity. This is the entity that represents the best abstractionfor what the system does or models. The central entity isidentified in a similar way to transform analysis [Yourdon 7 9 1 ,but instead of searching for where incoming and outgoing ----ata- -___lows are most abstract we look for a set o f processes and ----ata
- _ _ _ _ _tores that are most abstract. It may sometim es be necessary to
0 . 4 . 6 . 7
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 8/15
l o ok a t l ow er l e v e l d a t a f lo w d ia gr am s t o f i n d t h e c e n t r a le n t i t y . EMS i s a s ys te m s e r v i n g a p er so n s i t t i n g a t a t e r m i n a lsending and re ce iv in g messages . O n f i g u r e 11 we h a v e c i r c l e dt h e " c u r r e n t u s e r " d a t a s t o r e and t h e p r o c es s 1 .0 G E T EMSCOMMAND . T oge t he r t h i s p r o ce s s and d a t a s t o r e r e p r e s e n t t h euser enter ing commands a t a t e r m i n a l . Thus t h e y r e p r e s e n t t h e
c e n t r a l e n t i t y .
N ex t, we need t o f i n d e n t i t i e s t h a t d i r e c t l y s u p p or t t h ec e n t r a l e n t i t y . We do t h i s by fol low ing d at a f low s away f romt h e c e n t r a l e n t i t y and g r o u p i n g p r o c e s s e s and d a t a s t o r e s i n t oa b s t r a c t e n t i t i e s . I n our example the USER DIRECTORY d a t a s t o r eand t h e t h r e e p r o c e s s e s ( 2 . 0 , 4 . 0 a n d 5 . 0 ) s u p p o r t i n g i t form ane n t i t y . The p r o c e s s 3 . 0 ACCESS Q U E U E S w i t h t h e d a t a s t o r e U S E R
Q U E U E INDEX a l s o form an e n t i t y . A ll t h e s e e n t i t i e s a r e c i r c l e dand l a b e l e d on f i g u r e 11. We c on t i nu e t o f o l lo w t h e d a t a f lowsand t o i d e n t i f y e n t i t i e s u n t i l a l l t h e p r oc e s s es and d a t a s t o r e sa r e a s s o c i a t e d w i th a n e n t i t y .
F igure 12 i s t h e -----n t i t y graph- - f o r EMS. S q u a r e s r e p r e s e n te n t i t i e s , l i n e s w i t h a r r o w s r e p r e s e n t f l o w o f co nt ro l f rom onee n t i t y t o a no t h er , and l i n e s w i t h no a r rowhead represen ti n t e r a c t i o n s where f l o w o f c o n t r o l i s n o t y e t d e t e r m i n e d . A
"most s e n i o r " e n t i t y i s p l ac e d i n t o t h e d e s ig n t o g i v e ani n i t i a l f low o f c o n t r o l . I n t h e EMS e x a m p l e , e n t i t y EMS i s t h i smost s e n i or o b j e c t , and we have t he U S E R INTERFACE e n t i t y" c o n t r o l l in g " t h e e x t er n a l e n t i t y USER. T h i s f l ow o f c o n t r o l
-FIGURE 11 EMS level 0 data flow diagram
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 9/15
MESSAGE
(1.0, 1) (20..0. (3.0, 3)5.0, 02)
I ' ' 1
IRECTOF?
%.0
MESSAGE
CENTEF?
FIGURE 12 EMS entity graph .FIGURE13 EMS object diagram
i n t o U S E R w i l l u l t i m a t e l y b e i m p l e m e n t e d a s r e a d a n d w r i t eo p e r a t i o n s . N o t e a l s o t h a t t h e U S E R e n t i t y c o n t r o l s E M S . T h i sf l o w o f c o n t r o l r e p r e s e n t s t h e u s e r i n v o k i n g t h e E M S s y s t e m .
A f t e r t h i s i n v o c a t i o n c o n t r o l r e s i d e s w i t h E M S u n t i l t h e s y s t e mi s e x i t e d . A l l o t h e r p o t e n t i a l i n t e r f a c e s a r e s h o w n b y l i n e sw i t h n o a r r o w s . T h e n um be r s i n s i d e t h e s q u a r e s r e p r e s e n t t h ep r o c e s s e s a n d t h e d a t a s t o r e s c o n t a i n e d i n t h e e n t i t y . T h i sp r o v i d e s t r a c e a b i l i t y f r o m r e q u i r e m e n t s t o d e s i g n .
T h e e n t i t y g r a p h i s t h e s t a r t i n g p o i n t f o r o b j e c ti d e n t i f i c a t i o n . I t s h o w s e n t i t i e s w i t h t h e h i g h e s t a b s t r a c t i o np o s s i b l e a n d a l s o s h o w s a l l t h e p o s s i b l e i n t e r c o n n e c t i o n sb e t w e e n t h e e n t i t i e s . S i n c e we a r e t r y i n g t o b a l a n c e d e s i g nc o m p l e x i t y , o b j e c t a b s t r a c t i o n , a n d c o n t r o l h i e r a r c h y , we w i l l
a l t e r t h e e n t i t y g r a p h t o f o r m t h e f i n a l o b j e c t d i a g r a m . I n E M S
t h e e n t i t i e s a r e e a s i l y m a p p e d i n t o o b j e c t s . T h e e n t i t i e s U S E R ,
U S E R INTERFACE, and E M S f o r m a c y c l i c g r a p h a nd t h e r e f o r e a r e ont h e same v i r t u a l m a c h i n e l e v e l . We c a n n o t c o m b i n e a n e x t e r n a le n t i t y i n t o a n o b j e c t , b u t c o m b i n i n g E M S a n d U S E R I N T E R F A C E
y i e l d s a s i n g l e o b j e c t t h a t i s s e n i o r t o U S E R D I R E C T O R Y a n dM E S S A G E CENTER. C o m b i n i n g t h e t w o j u n i o r o b j e c t s w o u l d s im p 1 i f yt h e d e s i g n , b u t a t t h e e x p e n s e o f a b s t r a c t i o n , a s t h e m e s s a g ep a s s i n g m e c h a n i s m s h a v e l i t t l e t o d o w i t h t h e d i r e c t o r y . Weh a v e a l s o c h o s e n t o m a ke U S E R DIRECTORY s e n i o r t o M E S S A G EC E N T E R , s i n c e t h e d a t a f l o w s a r e f r o m U S E R D I R E C T O R Y i n t o d a t as t o r e s c o n t a i n e d b y M E S S A G E C E N T E R . F i g u r e 1 3 s h o w s t h er e s u l t i n g o b j e c t d i a g r a m .
0 . 4 . 6 . 9
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 10/15
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 11/15
p a c k a g e U s e r - D i r e c t o r y i s
s u b t y p e U S ER - N AM E is STRING(l..EO);s u b t y p e P A S S W O R D i s STRING(1..6);t y p e L I S T- -F N A M E S is a r r a y ( P O S I T I V E r a n g e c > ) o f U S E R - N A M E ;
p r o c e d u r e S i g n o n ( U s e r : i n U S E R- N A ME ; PW : i n P A S S W O R D ;
p r o c e d u r e A d d - U s e r ( U: i n U S E R N A M E ; P W : i n P A S S W O R D ) ;p r o c e d u r e D e l e t e - U s e r ( U: in U S E R - NA M E ) ;f u n c t i o n L i s t - N a me s r e t u r n LI S T- O F- N AM E S;
V a l i d - U s e r : o u t B o o l e a n ) ;
e n d U s e r - D i r e c t o r y ;
T h e p a c k a g e s p e c i f i c a t i o n s d e r i v e d f r o m t h e l e ve l 0 o b j e c td i a g r a m a r e p l a c ed i n t h e d e c l a r a t iv e p a r t o f t h e t o p le ve l A d ap r o c e d u r e a s f o l l o w s:
p r o c e d u r e EMS is
p a c k a g e U s e r - I n t e r f a c e isp r o c e d u r e S t a r t ;
e n d ' U s e r - I n t e r f a c e ;
p a c k a g e U s e r- i r e c t o r y i _ s
e n d U s e r- i r e c t o r y ;
p a c k a g e M e s s ag e - Qu e u e s is
e n d M e s s a g e u e u e s ;
p a c k a g e b o d y U s e r I n t e r f a c e is s e p a r a t e ;p a c k a g e b o d y U s e r- D i re c t or y is s e p a r a t e ;p a c k a g e b o d y M e s s a g e - Qu e u e s is s e p a r a t e ;
U s e r 1 n t e r f a c e . S t a r t ;
. . .
. . .
b e g i n
e n d EMS;
f o r l o w e r l ev e l o b j e c t d i a g r a m s t h e m a p p i n g i s s i m i l a r , w i t hp a c k a g e s p e c i f i c a t i o n s b e i n g n e s t ed in t h e p a c k a g e b o d y o f t h ep a r e n t o b j e c t . S t a t e s a r e m a p p e d i n t o p a c k a g e b o d y v a r i a b l es .T h i s d i r e c t m a p p i n g p r o d u c e s a h i g h l y n e s t e d p r o g r a m s t r u c t u r e .T o i m p l e m e n t t h e s a m e o b j e c t d i a g r a m w i t h l i b r a r y u n i ts w o u l d
r e q u i r e t h e a d d i t io n o f a p a c k a g e t o c o n t a i n d a t a t y p e s u s e d b yt w o o r m o r e ob j e c ts . T h i s a d d ed p a c k a g e w o u l d s e r v e a s a g l o b ald a t a d i c t i o n a r y .
T h e p r o c e s s o f t r a n s f or m i n g o b j e c t d i a g r a m s t o A d a isf o l l o w e d d o w n al l t h e c h i l d o b j e c t d i a g r a m s u n ti l w e a r e a t t h el e v e l o f i m p l e m e n t i n g i n d i v i d u a l s u b p r o g r a m s . If t h e m a p p i n g isd o n e w i t h o u t e x p l i c i t l y c r e a t i n g l i b r a r y u n i t s t h e l o w e s t l e ve ls u b p r o g r a m s will a ll b e i m p l e m e n t e d a s s u b u n i t s , r a t h e r t h a n bye m b e d d i n g t h e c o d e i n p a c k ag e b od i es .
0.4.6.11
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 12/15
5. E V A L U A T I O N O F THE M E T H O D O L O G Y
T o m e a s u r e h o w w e l l a b s t r a c t i o n a n a l y s i s w o r k s a s am e t h o d o l o g y w e m u s t f i r s t d e f i n e o u r c r i t e r i a f o r a g o o dm e t h o d o l o g y . W e will u s e B a r r y B oehm' s " S e v e n P r i n c i p l e s o fS o f t w a r e E n g i ne e r i ng " [ B o e hm 761 a s a b a s i s o f c o m p a r i s o n .
T h e s e p r i n c i p l e s a re :
M a n a g e u s i n g a s e q u e n t i a l l i f e c y c l e p l a nM a i n t a i n d i s c i p l i n e d p r o d u c t c o n t r o lP e r f o r m c o n t i n u o u s v a l i d a t i o nU s e e n h a n c e d t o p d o w n s t r u c t u r e d d e s i g nM a i n t a i n c l e a r a c c o u n t a b i l it y f o r r e s u l t sU s e b e t t e r a n d f e w e r p e o p l eM a i n t a i n a c o m m i t m e n t t o i m p r o v e t h e p r o c e s s
A b s t r a c t i o n a n a l y s i s s u p p o r t s a ll t h e s e p r i n c i p l e s . .The----i f e c y c l e p l a n i s s u p p o r t e d by p r o v i d i n g t h e a b s t r a c t i o na n a l y s i s m e t h o d f o r p r o d u c i n g o b j e c t d i a g r a m s , w h i c h a r e i n t u r n
m a p p a b l e i n t o A da . T h i s a l s o p r o v i d e s a m e a n s o f d i s c i p l i n e dF r o d u c t c o n t ro l by t r a c i n g h o w A d a s o f t w a r e i m p l e m e n t s a n o b j e c torienxed--&%Tsn, and al s o tr ac in g h o w t h e d e s i g n m e e t s t h es p e c if i c a ti o n . T h i s t r a c e a b i l i t y a l l o w s a m a n a g e r t o s e e t h a ts o f t w a r e m e e t s i t s s p e c i f i c a t i on , a n d a l l o w s m a i n t e n a n c e o fs p e c i f i c a t i o n s , d e s i g n , a n d s o f t w a r e t o b e c o n s i s t e n t . G r a d yBooch's [Booch 8 3 1 w o r k i n f l u e n c e d o u r m e t h o d o l o g y , b u t d i d n o tp r o v i d e a s uf f i c i e n t m e a n s o f s p e c i f y i n g l a r g e s y s te m s. A n o t h e rd r a w b a c k i s t h a t B o o c h d o e s n o t d e f i n e a f o r m a l m a p p i n g f r o m as p e c i f i c a t i o n t o a d e s i g n .
T h e g r a p h i c n o t a t i on s u p p o r t s a top d o w n a p p r o a c h t os o f t w a r e d e v e l o p m e n t . T h e l e v e l i n g o f b o t h - &f af To w- ai ag ra ms
a n d o f o b j e c t d ia gr .a ms a l l o w s t h e d e s i g n e r t o s t a r t a t a h i g hl e ve l a n d w o r k t o p - d o w n t o a d e s i g n s o l u t i o n . T h e u s e o fg r a p h i c s a l s o s u p p o r t s c o n t i n u o u s v a l i d a t i o c b y m a k i n g d e s i g nw a l k t h r o u g h s a n d i t e r a t i v e c h a n g e s e a s i e r t a s k s t o p e rf o r m.B o t h B o o c h a n d C h e r r y [ C h e r r y 8 5 b ] u s e g r a p h i c s , b ut 'B oo ch 'sn o t a t i o n w a s n o t d e s i g n e d f o r l a r g e a p p l i c a t i o n s , a n d C he rr y' sm e t h o d o l o g y s t o p s g r a p h i n g a f t e r al l t h e c o n c u r r e n t o b j e c t s h a v eb e e n i d e n t i f i e d . T h e g r a p h i c s u s e d b y s t r u c t u r e d a n a l y s i s[ D e M a r c o 791 p r o v i d e t h e b e st a n a l og y t o h o w g r a p h i c s a r e u s edi n t h e o b j e c t d i a g r a m n o t a t i o n.
T h e l i f e c y c l e m o de l w e h a v e d e f i n ed a l s o s u p p o r t s t h er e m a i n i n g t h r e e p r i n ci p l e s. O b j e c t s a r e d e f i n e d i n t h e d e s i g np h a s e a n d i m p l e m e n t e d a s s e p a r a t e A d a c o m p i l a t i o n u n it s . T o o l ss u c h a s u n i t d e v e l o p m e n t f o l d e r s c a n b e u s e d t o m a i n t a i n-------------c c o u n t a b i l i t y f o r c o m p l e t i o n o f t h e d e s i g n , i m p l e m e n t a t i o n , a n dt e s t i n g o f o b j e c t s. I t i s h o p e d t h a t t h e o b j e c t - o r i e n t e da p p r o a c h a n d t h e u s e o f A d a w i ll e n h a n c e b o t h p r o d u c t i v i t y an ds o f t w a r e r e l i a bi l i t y . T h i s a s s e r t i o n will b e t e s t e d b ym e a s u r i n g t h e o u t c o m e of t h e p i l o t p r o j e ct i n t h e S o f t w a r eE n g i n e e r i n g L a b o r a t o r y a t G o d d a r d S p a c e F l i g h t C e n t e r . T h es u c c e s s o f t h i s m e t h o d o l o g y w o u l d a l l o w ------e t t e r ---n d -----e w e r p e o p l e- --t o c o n c e n t r a t e m o r e e f f o r t o n p r o d u c i n g a g o o d d e s i gn .
D . 4 . 6 . 1 2
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 13/15
F i n al l y , w e a r e . c e r ta i n l y c o m mi t t ed t o i m p ro v i ngp r o ce s s. T h e o b j e c t d i a g r a m notation-and--absfraction a n a l y s i sh a? e- ai re ad y s e e n m u c h c h a n g e s i n c e t h e i n i t i a l v e r s i o n s w e r ed e fi n e d. F u r t h e r r e f i n e m e n t will b e t o d e f i n e c r i t e r i a f o ru s i n g p a r a l le l i s m , c r i t e r i a f o r c h o o s i n g b e t w e e n l i b r a r y u n i t sa nd t h e n e s t ed a p p ro a c h d e f i n e d a b ov e , a nd t o g e n e r a t e o b j e c t -o r i e n t e d a p p r o a c h e s t o s o f t w a r e s p e c i f i c a t i o n s a n d s o f t w a r et e s t i n g .
6. CONCLUS I ON
O b j e c t d i a g r a m s h a v e b e en u s ed t o d e s i g n a 5 0 0 0 s t a t e m e n tt e a m t r a i n g i n g e x e r c i s e a n d t o d e s i g n t h e e n t i r e d y n a m i c ss i m u l a t o r . T h e y a r e a l s o b e i n g u s ed t o d e s i g n a n o t h e r 5 0 , 0 0 0s t a t e m e n t A d a s y s t e m a n d a p e r s o n na l c o m p u t e r b a s e d s y s t e m t h a tw i l l b e w r i t t e n i n M o d u l a 11 . O u r d e s i g n m e t h o d o l o g y e v o l ve do u t o f t h e s e e x p e r i e n c e s a s w e l l a s t h e l i m i t a t i o n s o f o t h e rm e t h o d s w e s t u d ie d . O b j e c t d i a g r am s , a b s t r a c t i o n a n a l y s i s a nda s s o c i a t e d p r i n c i p l e s p r o v i d e a u n i f i e d f r a m e w o r k w h i c he n c o m p a s s e s c o n c e p t s f r o m [ Y o u r d on 791, [ B o o c h 8 3 1 a n d[ C h e r r y 8 5 b l . T h i s g e n e r a l o b j e c t - o r i e n t e d a p p r o a c h h a n d l e sh i g h l e v e l s y s t e m d e s i g n , p o s s i b l y w i t h c o n c u r r e n c y , t h r o u g ho b j e c t - o r i e n t e d d e c o m p o s i t i o n d o w n t o a c o m p l e t e l y f u n c t i o n a ll e ve l . W e a r e c u r r e n t l y s t u d y i n g h o w o b j e c t - o r i e n t e d c o n c e p t sc a n be us e d i n o t h e r p h a s e s o f t h e s o f t w a r e l i f e - c y c l e , s u c h a ss p e c i f i c a t i o n a n d t e s t i n g. W h e n c o m p l e t e , t h i s s y n t h e s i s s h o u l dp r o d u c e a t r u l y g e n e r a l o b j e c t - o r i e n t e d ------e v e l o p m e n t--- m e t h o d o l o g y .
TRADEMARKS
A d a i s a t r a d e m a r k o f t h e US G o v e r n m e n t ( A d a J o i n t P r o g r a mO f f i c e ) .
P A M E L A i s a t r a d e m a r k o f G e o r g e W. C h e r r y .
REFERENCES
[ B o e h m 761 B o e h m , B a r r y W . " S e v e n B a s i c P r i n c i p l e s o fS o f t w a r e E n g i n e e r i n g , " N A S A / G SF C E n g i n e e r i n gC o l l o q u i u m , 1976.
[ B o o c h 831 G r a d y B o o c h . --------o f t w a r e --n g i n e e r i n g------ w i t h M a ,B e n j a m i n / C u m m i n g s , 1983.
[ C h e r r y 8 5 a ] G e o r g e W. C h e r r y . P A M E L A : P r o c e s s A b s t r a c t i o nM e t h o d f o r E m b e d d e d L a r g e A p e1 --------,c a t i o n s C o u r s en o t e s , T h o u g h t * * T o o l s , J a n u a r y 1 9 8 5 .------ --- -_-_---- ---
G e o r g e W . C h e r r y a n d G r a d S. C r a w f o r d . T h eC h e r r y 8 5 b ]P A M E L A ltlnl -___-----e t h o d o l o g y , N o v e m b e r 1 9 8 5.
[ D e M a r c o 7 9 1 T o m D e M a r c o . ----------t r u c t u r e d ----n a l i s i s-- ---n d -y s t e m----p e c i f i c a t i o n----------, P r e n t i c e - H a l l , 1979.
---------
D.4.6.13
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 14/15
[ D i j k s t r a 681 E d s g a r W . D i j k s t r a . " T h e S t r u c t u r e o f t h e 'THE'--------------o m m u n i c a t i o n s --f ---h eu l t i p r o g r a m m i n g S y s t e m , "---C M , M a y 1968.
[ G o l d b e r g 8 3 1 A d e l e G o l d b e r g a n d D a v i d R o b i s o n . ---_----_m a l l t a l k ---0:Imp1 e m e n t a t i o n .
A a a i s o n - W e s l e y , 1983,-
-- --_-__---_-t sh e Language a n d ---
[ L i s k o v 7 4 1 B a r b a r a H . L i s k o v a n d S. N. Z i l l e s .
" P r o g r a m m i n g w i t h A b s t r a c t D a t a T y p e s , " P r o c . o ft h e A C M S y m p . o n V e r y H i g h L e ve l L a n g u a g e s ,-------I G P L A N -------o t i c e s , A p r i l 1974.
[ N e l s o n 861 R o b e r t W. N e l s o n. " N A S A A d a E x p e r i m e n t - -A t t i t u d e D y n a m i c S i m u l a t o r ," -----r o c . --f------a s h i n g t o n-- ---d a S y m p o s i u m , M a r c h , 1986.
[ P a r n a s 7 2 1 D a v i d L. P a r n a s . " O n t h e C r i t e r i a t o b e U s e d i nD e c o m p o s i n g S y s t e m s i n t o M o d u l e s , '
--------------o m m u n i c a t i o n s --f ---h e ---C M , D e c e m b e r 1 9 72 .
[ R a j l i c h 8 5 1 V a c l a v R a j l i c h . " P a r a d i g m s f o r D e s i g n a n d
I m p l e m e n t a t i o n i n A d a , " -----------_--o m m u n i c a t i o n s --f ---h e---C M , J u l y 1985.
[ S e i d e w i t z 8 5 a ] Ed S e i d e w i t z . O b J e c t-- ---i a g r a m s---, u n p u b l i s h e d G S F Cr e p o r t , M a y 1985,
[ S e i d e w i t z 8 5 b ] Ed S e i d e w i t z . S o m e P r i n c i p l e s o f O b Je c t--------r i e n t e d ----e s i g n , u n p u b l i s h e d G S F C r e p o r t , A u g c z f1 9 8 5 .
[ S t a r k 861 M i k e S t a r k . -----------b s t r a c t i o n ----n a l y s i s :--- F r o m----------t r u c t u r e d S p e c i f i c a t i o n t o --b J e c t - O r i e n f e a-----------
----e s i g n , u n p u b i i s ~ e a - ~ S T ~ - r e p o r t ,p r i l 1986.
[ Y o u r d o n 7 9 1 E d w a r d Y o u r d o n a n d L a r r y L. C o n s t a n t i n e .S t r u c t u r e d D e si g n: F u n d a m e n t a l s o f 2 -----i s c i e l i n e---
--f ---o m p u t e r--- ---r o g r a m-- ---n d - y s f e m s---- ----e s i g n ,P r e n t i c e - H a l l , 1 9 7 9 .
---------- ---- -- ------------
D.4.6.14
8/8/2019 Towards a General Object-Oriented Software
http://slidepdf.com/reader/full/towards-a-general-object-oriented-software 15/15
SESSION D.5
Panel Chair:
CAIS PANEL
David PruettNASA Johnson Space Center
Panel members:
Clyde RobyJack KrammerInstitute for Defense AnalysisAlexandria, Virginia
Sue LeGrandSofTechHouston, Texas
Robert StevensonGould ElectronicsFort Lauderdale, Florida
Robert FainterVirginia TechBlacksburg, Virginia
Hal HartTRW Defense Systems GroupRedondo Beach, California
D.5.1