languages for the programming of real-time embedded systems

11
i e , : ELSEVIER Microprocessors and Microsystems 20 (1996) 67-77 MICII0PlK)CES.~I3RS AND MICROSYSTEMS Languages for the programming of real time embedded systems A survey and comparison J E Cooling Dept. o f Elect ronic and Electrical Engin eeri ng Loughbo rough Univers ity Lough borou gh Leics LE l l 3TU UK Received April 1995; accepted Oc tober 1995 bstract The choice of programming language for use in a real-time embedded systems project can be a crucial one. It is clear, however, that decisions are frequently made purely on commercial and/ or fashion grounds rather than technical aspects. While commercial factors are often the m ore important, software developers should be aw are of the associated technical implicatlo~ns.This paper details the technical requirements of real-time embedded systems programming: then evaluates a variety of mode m languages in the light of such requirements. A general overview of 13 languages is given, followed by a detailed evaluation of Ad a, C, C++, Modula-2/Pascal and Oberon-2. Keywords: Programming languages; Embedded systems; Survey 1. Introduction When we come to evaluate and select a language for use in real-time systems, two questions are fundamental: (a) What languages are available? (b) What do we require from these languages? Many languages have been developed over the last 40 years for use in real-time computing applications [1]. However, few have been widely applied - on an international scale - in industry and academia. The discussion here restricts itself (mainly) to languages belonging to that category. Further, issues of suitability, availability, current usage and future developments also have a bearing on language selection. It is also important to match languages to our requirements. Thus it is essential to clearly, and explici tly, define such requirements. To p ut this in simple terms, answers depend on questions. This is well illustrated in the papers by Cullyer et al. [2] and Halang and Stoyenko [3]. In this paper the primary con- sideration is the development of software for embedded systems. Moreover, the title has been carefully chosen to avoid disputes over what are real-time languages [3]. 0141-9331/96/ 15.00 © 1996 Elsevier Science B.V. All fights reserved SSDI 0141-9331(95)01067-X 2. Matching requirements to languages 2 1 General In smaller embedded applications, the computer is merely one component within the complete system. Its primary role is to perform some system function, e.g. a missile autopilot controller. The fact that it is a digital com puter is almost incidental to the role. That is, it is not a computing machine per se. In lar ger embedded systems air traffic control, for instance - the situation is not so dear-cut. Such systems consist of many computers, arranged in both multiprocessor and multicomputer con- figurations. Some of these are applied in a true em bedded mode. Some may be used purely as information pro- cessing machines. Yet others may be employed to provide complex man-machine interfaces (graphical user interfaces - GUIs). Such combinations are here defined as hybrid systems. In hybrid systems the requirements are not homo- geneous. There are, for instance, significant differences between GU I design and safety-critical software. This is leading to more use of multi-language working within the same project (discussed late0. However, in this paper emphasis is placed on the programming of true embedded systems. Language features required to

Upload: benedict-josman

Post on 14-Oct-2015

33 views

Category:

Documents


0 download

TRANSCRIPT

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    1/11

    ie , :

    E L S E V I E R Microprocessors and Microsystems 20 (1996) 67-7 7

    MICII0PlK)CES.~I3RS ANDMICROSYSTEMS

    Languages for the program m ing o f real time embed ded sys temsA survey and compa ri son

    J E Coo l ingDept. of Electronic and Electrical Engineering Loughborough University Loughborough Leics LEl l 3TU UK

    Received April 1995; accepted Oc tober 1995

    bs trac t

    The choice of prog ram min g language for use in a real-time em bedd ed systems project can be a crucial one. It is clear, however, thatdecis ions are frequently made purely on commercial a nd/ or fashion ground s ra ther tha n technical aspects. While commercial factorsare o ften the m ore im po rtan t, softw are developers sh ould be aw are o f the associated technical implicatlo~ns. This pa per details thetechnical requirements of real-time embedded systems programming: then evaluates a variety of mo de m languages in the light of suchrequirements. A g eneral overview of 13 languages is given, followed by a detailed evalu ation of Ad a, C, C + + , Modula-2/Pascal andOberon-2.Keywords: Program ming languages; Embedded systems; Survey

    1 . I n t r o d u c t i o nW h e n w e c o m e t o e v a l u a t e a n d s e l e c t a l a n g u a g e

    f o r u s e i n r e a l - t i m e s y s t e m s , t w o q u e s t i o n s a r ef u n d a m e n t a l :( a) W h a t l a n g u a g e s a r e a v a i l a b le ?( b ) W h a t d o w e r e q u i r e f r o m t h e s e la n g u a g e s ?M a n y l a n g u a g e s h a v e b e e n d e v e l o p e d o v e r t h e l a s t 4 0y e a r s f o r u s e i n r e a l - t i m e c o m p u t i n g a p p l i c a t i o n s [ 1 ] .H o w e v e r , f e w h a v e b e e n w i d e l y a p p l i e d - o n a ni n t e r n a t i o n a l s c al e - i n in d u s t r y a n d a c a d e m i a . T h ed i s c u s s i o n h e r e r e s t r ic t s i t s e l f ( m a i n l y ) t o l a n g u a g e sb e l o n g i n g t o t h a t c a t e g o r y . F u r t h e r , i s su e s o f s u i t a b i l it y ,a v a i l ab i l it y , c u r re n t u s a g e a n d f u t u r e d e v e l o p m e n t s a l s oh a v e a b e a r i n g o n l a n g u a g e s e l e c t i o n .

    I t i s a l s o i m p o r t a n t t o m a t c h l a n g u a g e s t o o u rr e q u i r e m e n t s . T h u s i t i s e s s e n t i a l t o c l e a r l y , a n de x p l i c it l y , d e f i n e s u c h r e q u i r e m e n t s . T o p u t t h i s i n s i m p l et e r m s , a n s w e r s d e p e n d o n q u e s t i o n s . T h i s i s w e l li l l u s t r a t e d i n t h e p a p e r s b y C u l l y e r e t a l . [2 ] a n d H a l a n ga n d S t o y e n k o [ 3 ] . I n t h i s p a p e r t h e p r i m a r y c o n -s i d e r a ti o n i s t h e d e v e l o p m e n t o f s o f t w a r e f o r e m b e d d e ds y s t e m s . M o r e o v e r , t h e t i t l e h a s b e e n c a r e f u l l y c h o s e nt o a v o i d d i s p u t es o v e r w h a t a r e r e a l - ti m e l a n g u a g e s[3].0141-9331/96 / 15 .00 1996 E lsev ie r Sc ience B .V. Al l f igh ts reservedSSDI 0 1 4 1 - 9 3 3 1 ( 9 5 ) 0 1 0 6 7 - X

    2 . M a t c h i n g r e q u i r e m e n t s t o l a n g u a g e s2 1 General

    I n s m a l l e r e m b e d d e d a p p l i c a t i o n s , t h e c o m p u t e r i sm e r e l y o n e c o m p o n e n t w i t h i n t h e c o m p l e t e s y s t e m . I t sp r i m a r y r o l e i s t o p e r f o r m s o m e s y s t e m f u n c t i o n , e . g . am i s s i l e a u t o p i l o t c o n t r o l l e r . T h e f a c t t h a t i t i s a d i g i t a lc o m p u t e r i s a l m o s t i n c i d e n t a l t o t h e r o l e . T h a t i s , i t is n o ta c o m p u t i n g m a c h i n e p e r s e. I n l a rg e r e m b e d d e d s y s te m s

    a i r t r a ff i c c o n t r o l , f o r i n s t a n c e - t h e s i t u a t i o n i s n o t s od e a r - c u t . S u c h s y s t e m s c o n s i s t o f m a n y c o m p u t e r s ,a r r a n g e d i n b o t h m u l t i p r o c e s s o r a n d m u l t i c o m p u t e r c o n -f i g u r a ti o n s . S o m e o f t he s e a r e a p p l i e d i n a t r u e e m b e d d e dm o d e . S o m e m a y b e u s e d p u r e l y as i n f o r m a t i o n p r o -c e s si n g m a c h i n e s . Y e t o t h e r s m a y b e e m p l o y e d t op r o v i d e c o m p l e x m a n - m a c h i n e i n t e r f a c e s ( g r a p h i c a lu s e r in t e r fa c e s - G U I s ) . S u c h c o m b i n a t i o n s a r e h e r ed e f i n e d a s h y b r i d s y s t e m s .

    I n h y b r i d s y s t e m s t h e r e q u i r e m e n t s a re n o t h o m o -g e n e o u s . T h e r e a r e , f o r i n s t a n c e , s i g n i f i c a n t d if f e r e n c e sb e t w e e n G U I d e s i g n a n d s a f e t y - c r i t i c a l s o f t w a r e . T h i s isl e a d i n g t o m o r e u s e o f m u l t i - l a n g u a g e w o r k i n g w i t h i nt h e s a m e p r o j e c t ( d i s c u s s e d l a t e 0 . H o w e v e r , i n t h i sp a p e r e m p h a s i s i s p l a c e d o n t h e p r o g r a m m i n g o f t r u ee m b e d d e d s y s t e m s . L a n g u a g e f e a t u r e s r e q u i r e d t o

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    2/11

    68su p p o r t su c h p r o g r a m m i n g h a v e b e e n g r o u p e d i n t o f o u rcategories: Essent ia l . P r imary . Secondary . P e r f o r m a n c e .

    I t i s t aken for g ran ted tha t , whereve r poss ib l e , p ro-g r a m m i n g sh o u l d a l w a y s b e p e r f o r m e d i n a h i g h - l e v e ll anguage .2.2. Categorisation o f language ea tures

    .I .E. Cooling/Microprocessors and Microsystems 20 1996) 6 7-7 7 M ul t i t a sk ing - l anguage and run- t ime supp or t . In terfacing to f oreig n high level languag es. A subse t fo r sa fe ty-c r i ti ca l app l i ca t ions . A comprehens ive s t anda rd l i b ra ry . O b j e c t o r i e n t e d p r o g r a m m i n g ( O O P ) c o n s t r u ct s .

    F ina l ly the re a re pe r form ance fea tures , which inc lude : Se t t i ng of t a sk dead l ines . S imple eva lua t ion of code execut ion t imes . Gen era t ion o f de t e rmin i s t i c code . Select ion of schedu l ing st ra tegies. Inco rpor a t ion o f t iming ana lys i s mechani sm s.

    These , t hough they a re des i rab le , a re no t gene ra l lyava i l ab le a t t he presen t t ime .a) E ssential featu resEssent i a l f ea tures o f a l anguage fa l l i n to tw o groups .T h e r e a r e t h o se w h i c h m u s t b e p r o v i d e d t o e n a b l e t h ec o m p u t e r t o b e p r o g r a m m e d . T h e n t h e r e a r e t h e o n e sn e c e s sa r y f o r t h e c o m p u t e r t o b e p r o g r a m m e d d i r e c t l yin the na t ive l anguage . The fo l lowing i t ems have beendefined to be essent ia l : A sse m b l y la n g u a g e a n d m a c h i n e c o d e in t e rf a c in g . A b s o l u t e a d d r es s i n g. A c c e s s t o a n d c o n t r o l o f h a r d w a r e . Bi t man ipula t ion . In t e r rup t handl ing . Po in te r s ( fo r use w i th dynam ic da t a s t ruc tures) . Spec i f i ca tion of t ime de lays v ia source code s t a t ement s . P rocess or (o r env i ronmen t ) spec i f ic ex tens ions to the

    core l anguage .A l ess s t r ingent ca t egory is p r ima ry . P r imar y fea tures

    a r e t h e u n d e r p i n n i n g s f o r t h e d e v e l o p m e n t o f c o r r e ct ,r e l i a b l e a n d s a f e p r o g r a m s . T h e se m a y b e r e g a r d e d a sessen t i al fo r the prod uc t io n o f h igh qua l i t y sof tware ,and inc lude : Wel l de f ined l anguage s t an da rd . W e l l d e f in e d b e h a v i o u r S t rong da ta typ ing . Rig orou s ly de f ined con t ro l s truc tures . Modula r s t ruc ture and sepa ra t e compi l a t ion fac i l i t i e s . E xcept io n handl ing cons t ruc t s . Fac i l i t i e s t o deve lop t a sk s t ruc tures . Fac i l i ti e s t o in t e r face to rea l -t ime execut ives (RT EX s)

    o r r e a l - ti m e o p e r a t i n g sy s t e m s ( R T O S s ) . M e m o r y e x h a u s t io n c h ec k s . Def ined ma ths fac il it ie s .

    Thi s l eads on to the secondary fe .a tures , t hose whichmake a s ign i f i can t impac t on produc t iv i ty , por t ab i l i t y ,ma in ta inab i l i t y , f l ex ib i l it y and e f f ic i ency (p l ease no tet h a t p o r t a b i l i t y a n d e f fi ci en c y m a y b e c o n t r a d i c t o r ya t t r ibu tes) . They may a l so enhance cor rec tness ,re l i ab i l i t y and sa fe ty a spec t s , t hough tha t i s no t t he i rbas i c i n t en t ion . Secondary fea tures inc lude : G o o d sy n t a x a n d la y o u t f e at u r es .

    2.3. C andidate languagesThe fo l lowing l anguages a re e i the r used in , o r a repoten t i a l candida te s fo r , r ea l - t ime appl i ca t ions .

    A d a B A S I C. CC C o r a l 6 6

    F o r t h F O R T R A N M o d u l a - 2 M o d u l a - 3 O b e r o n / O b e r o n - 2 Pasca l Pearl O c c a m

    E m b e d d e d sy s t e m s d e v e l o p m e n t h a s a l so b e e n d o n e i nRTL-2 , Pa ra l l e l C , Concur ren t Pasca l , Smal l t a lk andC o n i c a n d m a n y o t h e r sp e c i a l i s e d l a n g u a g e s . H o w e v e r ,a s t h e se a c c o u n t o n l y f o r a sm a l l p r o p o r t i o n o fembedded sof tware , t hey wi l l no t be d i scussed he re .

    Looking to the fu ture , seve ra l l anguages can ber e m o v e d f r o m f u r t h e r c o n s i d e r a t i o n . C o r a l 6 6 , f o rins t ance , i s g radua l ly be ing supe rseded by o the rl an g u ag e s, n o t a b l y A d a . F O R T R A N , f o r e m b e d d e dw o r k , a p p e ar s t o b e s u c c u m b in g to C a n d C + + . F o r t hoccupies a spec ia li sed n iche in the embe dde d wor ld , an dis l ikely to cont inue in that role 0nly. Pearl i s l i t t le usedout s ide Germany. Occam i s h igh ly spec ia l i sed (Trans-pute r p l a t forms) , and i s a l so g iv ing way to C. A br i e fo v e r v i e w o f th o se i n c o m m o n u se i s g iv e n b e l o w ; l a te rsec t ions g ive a de t a i l ed rev iew and compar i son .a) AdaI n t h e 1 9 70 s, th e U S D e p a r t m e n t o f D e f e n se ( D o D ) s e tou t t o b r ing orde r t o the i r ( a t t ha t t ime) chaot i c sof tware .Over 300 l anguages , i nc lud ing many spec ia l i sed ones ,

    were in use. The co s t o f suppor t ing these , in pa r t i cu la r

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    3/11

    J.E. Cooling~Microprocessors and Microsystems 20 1996) 67-77 69t h e m a i n t e n a n c e a sp e c t s , w a s e x t r e m e l y h i g h . F o u rse p a r a t e d e s i gn s t u d i e s w e r e c o m m i s s i o n e d t o d e v e l o p an e w l a n g u a g e , t a k i n g i n t o a c c o u n t t h e f o l l o w i n ga t t r ibu tes ( in p r io r i ty o rde r ) : C o s t R e sp o n s i v e n e s s T ime l iness Flexibi l i ty Rel iabi l i ty Main ta inab i l i t y Tra in ing T r a n sp o r t a b i l i t y R e a d a b i l i t y Wr i t eab i l i t y Eff ic iency Acceptab i l i t y

    The winning s tudy [4] was t aken forw ard andd e v e l o p e d i n to w h a t i s n o w k n o w n a s A d a 8 3 ( h er e , f o rb r e v i t y , A d a ) . T h i s w a s f o r m a l i s e d a s A N S I / M I L - S T D1815. The l anguage suppor t s modula r i sa t ion , sepa ra t ecompi l a t ion , concur rency ( t a sk ing) , except ion handl ing ,re l i ab i l i t y and modi f i ab i l i t y . Readabi l i t y i s good , p ro-grammer produc t iv i ty can be h igh , and s ign i f i can t l eve l so f p o r t a b i l i t y c a n b e a c h i e v e d .A d a w a s tr a d e m a r k e d b y t he U S D o D t o c o n t ro l i tsf u t u r e d e v e l o p m e n t . I t w a s d e c r e e d t h a t n o su b se t s o rsupe rse t s would be a l lowed. Thi s was to be a ' do-a l l 'l anguage . Unfor tuna te ly , t h i s re su l t ed in a l a rge ,c o m p l e x l a n g u a g e , p o s i n g m a n y p r o b l e m s f o r c o m p i l e rwr i t e r s. On e conseq uence i s t ha t , fo r U K sa fe ty-c ri t ica lappl i ca t ions , a ' sub-se t ' - S PA R K Ad a [5] - has beenc r e a te d . F u r t h e r , e x p e ri e n ce sh o w e d f u n d a m e n t a l w e a k -n e s se s w i t h t h e t a sk i n g m o d e l . C o n se q u e n t l y , m a n y ( i fn o t m o s t ) f a s t e m b e d d e d sy s t e m s d o n o t u se t h e A d as t a n d a r d r u n - t i m e su p p o r t sy s t e m . I n s t e a d t a sk s a r ee x e c u t e d u n d e r t h e c o n t r o l o f s e p a ra t e R T E X s o rR T O S s .

    A d a i s n o w i n a m a t u r e s t a te , a n d i s b e i n g w i d e ly u se din de fence , ae rospace , and s imi l a r sys t ems. However ,t h e r e h a s b e e n m u c h p r e s su r e t o u p d a t e t h e l a n g u a g e .T h i s h a s c o m e a b o u t m a i n l y f o r t w o r e a so n s . F i r s t ,p rac t i ca l expe r i ence h igh l igh ted the shor t comings ofthe or ig ina l des ign . Second , t he l anguage l acks the( c la i m e d ) a d v a n t a g e s o f o b j e c t - o r i e n t e d p r o g r a m m i n g .As a re su l t , a new s t anda rd was deve loped , Ada 95 .T h i s i s b u i l t o n A d a 8 3, a n d m a y b e r e g a r d e d a s a su p e r -se t o f t he or ig ina l l anguage . Som e incompa t ib i l i t i e s ex i s tbe tween the two, bu t t hese a re few in number . I t i sc l a im e d t h a t t h e m a j o r i t y o f e x i st in g A d a 8 3 p r o g r a m sc a n b e h a n d l e d b y A d a 9 5 c o m p il e rs . T h e n e w c o m p i l e rsa r e n o w b e c o m i n g a v a i l a b l e , b u t n o n e h a v e y e timplem ented the fu l l se t o f Ada95 fea tures .b ) B A S I C

    B A S I C ( B e g i n n n e r s A l l - p u r p o se S y m b o l i c I n s t r u c t io n

    C o d e ) w a s d e s i g n e d b y K e m e n y a n d K e r t z i n 1 9 6 5 a tD a r t m o u t h C o l le g e , U S A . I t w a s i n t e n d e d t o b e a s i m p le ,e a sy - t o - le a r n l a n g ua g e , g e a r e d m a i n l y t o i n p u t a n d o u t -pu t v i a key bo ard an d sc reen . Because of i t s s impl i c i ty i tq u i c k l y b e c a m e p o p u l a r a n d t h u s w i d e ly u se d . A l t h o u g hi t was neve r i n t ended for rea l - t ime use , ve rs ions su i t ab lef o r e m b e d d e d p r o g r a m m i n g b e c a m e a v a i l a b l e i n t h e1970s . It s o r ig inal f ea tures hav e been ex tende d to prov idecompi l ab le (no t i n t e rpre t ive ) code , s t ruc tured fea tures ,and low -level and m ul t i task ing faci li ties. T hese haveb e e n r e i n f o rc e d w i t h t h e p r o d u c t i o n o f a n A m e r i c a nN a t i o n a l S t a n d a r d s I n s t i t u t e ( A N S I ) s t a n d a r d f o rB A S I C .

    F o r t h o se w i t h o u t a f o r m a l c o m p u t i n g b a c k g r o u n d i thas been h igh ly popula r . Thi s i s e spec ia l ly t rue in thef ie lds o f mechanica l , c iv i l and process co nt ro l eng inee r -ing . A t the presen t t ime the re i s a g rea t dea l o f em bed dedso f t w a r e in u se w h i c h h a s b e e n w r i tt e n i n B A S I C . H o w -ever , t he de fac to s i t ua t ion i s t ha t numerous d i a l ec t s o fthe l angu age ex is t; t hus i t is d i f fi cu lt t o com pare i t w i tho t h e r l a n g u a g e s ( th e A N S I s t a n d a r d c o u l d , o f c o u rse , b eused a s a re fe rence po in t ) . A t t he pres en t t imes the re a res t r o n g i n d i c a t i o n s t h a t , f o r e m b e d d e d w o r k i n g , C / C + +is replacing BA SIC. T hus there is l it tle poin t in discussingi t fu r the r i n the contex t o f emb edde d sys t ems. Howe ver ,the re has been s ign if icant use of BAS IC for G U I deve lop-ment , us ing v i sua l BASIC. There i s no doubt t ha t fo rhybr id sys t ems, t he l anguage has many a t t rac t ivefea tures . An assessment o f v i sua l Bas i c i s beyond thescope o f t h is pape r ; i t is l e f t t o t he reade r t o fo l low th i s up .c ) c

    C came f rom AT T Be l l r e sea rch l abs in 1972 , hav ingbeen des igned by Denn i s Rich ie [6]. Up to tha t t ime m ostsy s t e m s p r o g r a m m i n g h a d b e e n d o n e u s i n g a s se m b l ylanguage ; C was meant a s a rep lacement fo r such t ech-n iques . I t s i n t en t ion was to p rov ide the f l ex ib i l i t y o fa s se m b l y l e v e l p r o g r a m m i n g t o g e t h e r w i t h t h e p o w e ra n d p r o d u c t i v i t y o f h i g h -l e v el l a n g u a g e w o r k i n g . I t w a sa l so des igned to be h igh ly e f f i c i en t . One ea r ly ma jora p p l i c a ti o n w a s i n t h e w r it in g o f th e U N I X o p e r a t i n gsys t em. Only much l a t e r , c i rca the mid 1980s , d id i tmake in roads in to rea l - t ime embedded appl i ca t ions .S ince then the re has bee n a ma jor up take of t he language ,a s s is t e d b y t h e p r o d u c t i o n o f t h e A N S I ' C ' s t a n d a r d . A tthe presen t t ime i t i s p ro bab ly the m ost w ide ly used rea l -t ime l anguage , fo r a numb er o f reasons , i nc lud ing thefact that : I t i s a re l a tive ly easy l anguage to l ea rn and use . I t i s s ign i f ican t ly m ore pow er fu l t han a ssem blylanguage . Com pi l e r s a re ava i l ab le for mo st mic roprocessors . M a n y v e n d o r s o f f e r p o w e r f u l , g r a p h i c s -b a se d d e v e l o p -m e n t e n v i r o n m e n t s . M o s t su p p o r t h o s t / t a r g e t sy s te m s ,

    t h e m a j o r i t y b e in g P C a n d w o r k s t a t i o n b a se d .

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    4/11

    70 M a n y su p p o r t t o o l s ( su c h a s r u n - t i m e c o d e a n a l y s i s )a r e i n te g r a t e d i n t o t h e p r o g r a m m i n g e n v i r o n m e n t .H o w e v e r , f o r m a n y a p p l i c at i o n s i t i s b e i n g r e p la c e d b yC + + .

    J.E. Cooling/Microprocessors and Microsystems 20 1996) 67-77

    ( d ) C + +C + + i s a l so a p r o d u c t o f B el l l a b s , fi rs t ap p e a r i n g a s'C w i th c l auses ' i n 1 98 0 . The des igne r i s Bja rneS t rou s t rup [7] . In 1985 the f i r st spec i f ica t ion prop e ra p p e a r e d , v e r s i o n V 1 . 0 . A s t a n d a r d h a s b e e n i s su e d( ISO/ IEC 9899) , bu t t h i s i s cons t an t ly be ing upda ted .

    C + + w a s b a s ed o n , a n d w a s m a d e c o m p a t i b le w i th , C( t h u s C c a n b e v ie w e d a s a su b se t o f C + + ) . T h e r e a so n sfor t hese dec i s ions were ve ry prac t i ca l ones : W i th in Be l l l abs and AT T as a whole , C was we ll

    e s t a b li sh e d a s a sy s t e m s p r o g r a m m i n g l a n g ua g e .M o r e o v e r , i t w a s i n w i d e sp r e a d u se . T h e se f a c t o r sw o u l d m i n im i se a c c e p t a n c e a n d i n t e g r a t i o n p r o b l e m s .

    C h a d r e a c h e d a m a t u r e s t a t e , m a n y p r o v e n c o m p i l e r sbe ing ava i l ab le . An ex tens ive se t o f l i b ra ry func t ions h ad been

    d e v e l o p e d . T h e r e w a s w i d e a v a i l a b il i ty o f d e v e l o p m e n t t o o l s su c h

    as ed i to r s , debugg ers , e t c .H o w e v e r , t h e m a i n r e a s o n f o r d e v e l o p i n g C + + w a s

    the des i re o f S t rous t rup to ov e rcom e the de f ic i enc ie s o f Ci tse lf . Th e pr im ary ob jec t ives were to p rov ide : S u p p o r t f o r m o d e r n so f t w a r e e n g i n ee r in g a n d

    p r o g r a m d e s i g n m e t h o d s . I m p r o v e d p r o g r a m s t r u c t u re s . I m p l e m e n t a t i o n o f o b j e c t o r i e n te d p r o g r a m m i n g

    (OOP) fea tures . G o o d t y p e c h ec k i ng . Po rtab i l i ty and eff ic iency. S t ra igh t fo rward ' fo re ign ' l anguage in t e rfac ing .

    I n e a r l y d a y s c o m p i l a t i o n w a s a t w o - s t a g e p r o c e s s ,us ing C compi l e r s . However th i s i s no longer the case ;a ll m o d e r n C + + c o m p i l e r s a re ' n a ti v e '. T h e r e a r e ex t e n -s iv e a n d c o m p r e h e n s i v e s e t s o f C + + l ib r a ri e s ( a l th o u g hv e n d o r i n c o m p a t i b i l i t y c a n b e a m a j o r p r o b l e m ) .

    e ) M o d u l a - 2M o d u l a - 2 h a s i t s r o o t s i n P a sc a l a n d M o d u l a . I t w a sd e v e l o p e d b y N i c k l a u s W i r th , t h e d e s i g n e r o f P a sc al ,dur ing the pe r iod 1977 to 1980 . In the ma in i t s ob jec t ivew a s t o i m p r o v e o n P a sc a l in t h e a r e a s o f : M o d u l a r c o n s t r u c t io n . S y s t e m s p r o g r a m m i n g . C o n c u r r e n c y .

    T o a c h i e v e t h e se e n d s i t b a se d i t s p r o g r a m s t r u c t u r eo n s e ts o f s e p a r a t e l y c o m p i l a b l e m o d u l e s , h a v i n gext remely s t rong type checking . Low- leve l fac i l i t i e s

    were incor pora t e d m aking dev ice handl ing a re la t ive lys imple t a sk . Fur the r , a s t anda rd in t e r rup t handl ingmech ani sm was spec i fi ed a s pa r t o f t he language . T heresu l t is tha t m any ( i f no t m ost ) r ea l - time prog ram smay be wr i t t en en t i re ly in Modula -2 ; t he re i s no needto re sor t t o a ssembly l anguage .M o d u l a - 2 h a s r e p l ac e d P a sc a l in m a n y a r e a s ( a lt h o u g ht h e i s su e i s c l o u d e d b y t h e f a c t t h a t m a n y m o d e r n'Pasca l s ' a re e ssen t i a l ly Modula -2) . A t t he presen t t imemost compi l e r s a re based on the l anguage de f in i t i on inP r o g r a m m i n g i n M O D U L A - 2 [ 8] . T h i s h a s g iv e n ri se t o ad e - f a c t o s t a n d a r d , l e a d in g t o g o o d l a n g u a g e p o r t a b i l it y .Un for tun a te ly , t he re a re s ign i f ican t d i f ferences in thel ib r a r ie s p r o v i d e d b y t h e c o m p i l e r v e n d o r s. T h e l a n g u a g eis a lso b e i n g s t a n d a r d is e d b y I S O ( d o c u m e n t D 1 0 6 /N336) . However , f ew compi l e r s a re ye t ava i l ab le whichcomply wi th th i s (d ra f t ) s t anda rd .

    P lease no te tha t Pasca l i s no t eva lua ted because i t i sh i g h l y i m p l e m e n t a t i o n d e p e n d e n t . F u r t h e r , c o m m e n t sr e la t in g t o P I M M o d u l a - 2 a l so a p p l y t o m a n y o f th eex tended Pasca l s .

    f ) M o d u l a - 3M o d u l a - 3 [ 9 ] o r i g i n a t e d f r o m t h e l a n g u a g e M o d u l a -2 + , w h i c h h a d b e e n d e v e l o p e d b y D i g i t a l E q u i p m e n tC o r p o r a t i o n a t i t s P a l o A l t o S y s t e m s R e se a r c h C e n t r e( S R C ) . P r o p o sa l s t o r e v i s e a n d s t a n d a r d i s e M o d u l a - 2 +w e r e p r o d u c e d a t t h e e n d o f 1 9 8 6 . T h e r e su lt w a s ac o l l a b o r a t i v e p r o j e c t b e t w e e n S R C a n d t h e O l i v e t t iR e se a r c h C e n t r e t o d e v e l o p t h e n e w l a n g u a g e M o d u l a -3 . Des ign took p l ace in the l a t e 80 ' s , t he l anguagedef in i ti on appea r in g in 1988 . The pr im ary des ign a imw a s t o p r o d u c e a p o w e r f u l , b u t s i m p l e , m o d e r n g e n e r a lp u r p o se p r o g r a m m i n g l a n g u a g e . M o r e o v e r , i t a i m e d t oc o n t i n u e t h e p h i l o so p h y o f M o d u l a - 2 b y a im i n g f o rs impl i c i ty and sa fe ty , based on proven fea tures . I tc o r r e c t e d so m e o f t h e l es s s e c u re f e a t u r es o f M o d u l a - 2and Pasca l , a t t he same t ime in t roduc ing new fac i l i t i e s .These inc lude suppor t fo r : T h e t h r e a d s m o d e l o f c o n c u r r e n c y . O b j e c t o r ie n t e d p r o g r a m m i n g . Excep t ion handl ing . Automat i c ga rbage co l l ec t ion . I n t e r f a c i n g t o C a n d U N I X f u n c t i o n s .

    Modula -3 has many exce l l en t f ea tures . I t i s a s power -f u l a s A d a 9 5 , a n d a l m o s t a s p o w e r f u l a s C + + ( b u t iss ign i fi can tly c l ea re r , s imple r and sa fe r) . M any comp i l e r sh a v e b e e n p r o d u c e d f o r t h e l a n g u ag e , m a i n l y f o r m a i n -f r a m e c o m p u t e r s a n d w o r k s t a t i o n s . U n f o r t u n a t e l y , f e wPC co mpi l e r s a re ava i l ab le , and the range o f mic ro-processors suppor t ed i s l imi t ed . Taking th i s i n toa c c o u n t , M o d u l a - 3 i s u n l i k e l y t o b e u se d i n e m b e d d e dsys t ems in any s ign i f i can t way . There fore a de t a i l edassessment o f t he l anguage wi l l no t be g iven he re .

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    5/11

    J.E. Cooling~Microprocessors and Microsystems 20 1996) 67-77H o w e v e r , d e v e l o p e r s o f h y b r i d sy s t e m s m a y w e l l f i nd t h e 3.2. P rimary featuresl a n g u a g e a t tr a c t iv e a s a n a l t e r n a ti v e t o C + + .g) Oberon~Oberon-2T h e O b e r o n p r o j e c t [ 1 0 ] w a s l a u n c h e d i n 1 9 8 5 b y

    N i c k l a u s W i r t h a n d Ju e r g G u t t k n e c h t . S t r ic t ly sp e a k in g ,O b e r o n e m b r a c e s t h r e e i te m s : I t is t he name of t he pro jec t . I t is t h e n a m e o f a p r o g r a m m i n g l a n g u a g e, O b e r o n . I t i s an ope ra t ing sys t em for pe rsona l wo rks t a t ions .

    I n O b e r o n , t h e l a n g u a g e i s e n m e sh e d w i t h t h e o p e r a t -ing sys t em. To fu l ly use the l anguage fea tures , su ppo r t o ft h e o p e r a t i n g sy s t e m is e s se n ti a l. M o sse n b o c k e x t e n d e da n d r e fi n e d O b e r o n t o p r o d u c e O b e r o n - 2 [ 11 ], t h is b e i n ga l a n g u a g e i n i t s o w n r i g h t . O b e r o n w a s b a se d o nM o d u l a - 2 . T h u s i t i s n o su r p r i s e t o f i n d t h a t O b e r o n - 2i s c lose ly re l a t ed to tha t l anguage . Wha t i t does i s bu i ldo n t h e c o n c e p t s o f M o d u l a - 2 a n d i n t r o d u c e so m e n e wf e a t u r e s . T h e m o s t i m p o r t a n t o n e s su p p o r t o b j e c to r i e n t e d p r o g r a m m i n g c o n c e p t s . H o w e v e r , t h e se d i f f e rc o n s i d e r a b l y f r o m t h e f e a tu r e s o f m a n y o t h e r O O P l a n-g u a g e s , b e i n g c o n s i d e r a b l y s i m p l e r ( so m e w o u l d s a yminima l i st i c ). An in form a l s t anda rd i sa t ion process isbe ing pursued . A t the presen t t ime th i s has gene ra t ed ase t o f g u id e li n e s f o r c o m p i l e r d e v e l o p e r s , th e O a k w o o dguide l ines [ I 2 ]. Ma ny comp i l e r s a re now ava i l ab le , basedo n b o t h P C a n d U N I X p l a t f o rm s . C o m p i l er s f o r v a r io u smic rocont ro l l e r s a re a l so under deve lopment . A l l l a t e rc o m m e n t s r e f e r t o O b e r o n - 2 a s sp e ci fi ed in t h e O a k w o o dd o c u m e n t .

    3 . L a n g u a g e c o m p a r i s o n3.1. Gene ral comm ent

    Exper i enced deve lop e rs kno w tha t i t i sn t suf f i c ien t t oeva lua te l anguages in the abs t rac t ; implementa t ionfac tors s ign i f i can t ly a f fec t t he re su l t s ob ta ined . In apap e r such a s th i s , how ever , i t i sn t poss ib l e to t akecompi l e r s and envi ronment s i n to account . Thi s i s l e f tt o the reade r .The re s t o f t h is sec t ion i s g iven ove r t o a com par i so n o fthe fo l lowing l anguages : A d a C C M o d u l a - 2 ( i n cl u d e s P a sc al ) O b e r o n - 2Thi s a ssessm ent i s p resen ted in th ree ca t egor i e s : e ssen ti a l ,p r i m a r y a n d s e c o n d a r y . P e r f o r m a n c e i s su e s a r e n o taddressed .

    71

    Assembly language and machine cod e interfacinga) Ada. I n A d a i t i s n e c e s sa r y t o u se su b p r o g r a m s t o

    access machine code cons t ruc t s . Wi th in these on lyl o w - l e v e l s t a t e m e n t s m a y b e u se d ; A d a so u r c e c o d ei s no t pe rm i t t ed . A s t anda rd l i b ra ry packageM A C H I N E _ C O D E i s r e q u i r e d t o s u p p o r t s u c hopera t ions . Beware , implementa t ions a re no t requi redto prov ide such a package .A sse m b l y l a n g u a g e o p e r a t i o n s m u s t a l so b e h o u se dwi th in a subprogram. Opera t ions de f ined wi th in th i sa r e i n se r t e d i n t o t h e A d a so u r c e c o d e u s i n g a p r a g m ac a ll e d I N T E R F A C E . T h i s a r e a is v e r y m a c h i n e a n dc o m p i l e r d e p e n d e n t ; i t n e ed n o t b e p r o v i d e d b y a n i m p le -m e n t a t i o n . T h u s t h e b e s t so u r ce s o f in f o r m a t i o n a r e t h ec o m p i l e r m a n u a l s .( b ) C . A sse m b l y l a n g u a g e m a y b e e m b e d d e d w i t h in Cso u r c e c o d e u s i n g a b l o c k d e n o t e d b y a sm . T h e y m a ya l so be wr i t t en a s sepa ra t e ex te rna l rou t ines , t hese com-m u n i c a t i n g w i t h t h e C p r o g r a m v i a f u n c t i o n c a l l s a n dr e t u r n p a r a m e t e r s . M a c r o s m a y a l so b e u se d t o p r o v i d ea s se m b l y l a n g u a g e o p e r a t io n s .(c ) C++. Thi s i s s imi l a r t o C.d) Modula-2. There a re no de f ined s t anda rd fac i l i t i e s

    for dea l ing wi th a ssembly l anguage or code inse r t s .Wh i l e th i s i s a n o t i ceab le o miss ion , i n rea l i t y i t i sn ta p r o b l e m . C o m p i l e r s w h i c h g e n e r a t e R O M a b l e c o d ea l so prov ide such fea tures a s an ex tens ion to the bas i cl anguage .e) Oberon-2. Th e O a k w o o d d o c u m e n t sp e c if ie s t h a t t h i s

    i s a h igh ly sys t em dependent fea ture . As such i t must beencapsu la t ed wi th in a c l ea r ly iden t i f i ed code procedure .T h e b o d y o f t h e p r o c e d u r e c o n t a i n s h e x b y t e s o rassemble r i ns t ruc t ions . Such procedures a re to berega rded a s be ing inhe ren t ly unsa fe because they a reunl ike ly to be po r t ab le [12] .Absolute addressinga) Ada. A d a c o n ta i n s a t y p e A D D R E S S s u p p li ed

    w i t h i n a s t a n d a r d p a c k a g e c a l l e d S Y S T E M . V a r i a b l e so f t h is t y p e m a y b e u se d t o sp e c if y t h e a b so l u t e a d -dresses of : P r o g r a m i te m s . T h e s t a r t p o i n t o f a su b p r o g r a m , p a c k a g e t a sk o r ta skentry. In t e r rup t vec tors .

    A d d r e s s i n g o p e r a t i o n s a r e c a r r i e d o u t u s i n grepresen ta t ion c l auses .

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    6/11

    72N o t e t h a t S Y S T E M i s a p r e d e f i n e d l i b r a r y p a c k a g e

    which inc ludes conf igura t ion-dependent i t ems.

    J.E . Cooling~Microprocessors and Microsystems 20 1996) 67-77

    (b) C. In C, abso lu t e address ing i s normal ly donethroug h the use of po in t e r s . P rec i se de t a i ls a rei m p l e m e n t a t i o n d e p e n d e n t .( c ) C + + . A b so l u t e a d d r e s s i n g c a n , a s i n C , b e d o n e b yu s i n g p o i n te r s . M a n y C + + c o m p i l e r s h a v e li b r a ryf u n c t i o n s w h i c h in c l u d e so m e f o r m o f p e e k a n d p o k eo p e r a t i o n f o r a c c e s si n g m e m o r y a d d r e s se s .d) Modula-2. L i k e A d a , M o d u l a - 2 u se s a n i m p l e m e n t a -

    t i o n d e p e n d e n t l ib r a r y , t h e S Y S T E M m o d u l e , t o su p p o r ta b so l u t e a d d r e s s i n g o p e r a t io n s .e) Oberon-2. O b e r o n - 2 , l ik e M o d u l a - 2 , u se s a S Y S T E M

    module to p rov ide low- leve l ope ra t ions spec i f i c t o ap a r t ic u l a r p r o c e s so r a n d / o r o p e r a t i n g sy s t em .Access to and control o f hardwarea) Ada. A d a u se s r e p r e se n t a t i o n c l a u se s t o m a p A d a

    code (abs t rac t ) on to pa r t i cu la r machines (conc re t e ) .Thi s requi re s fac i li t ie s suppl i ed a s pa r t o f t he SY ST EMp a c k a g e .( b ) C . H a r d w a r e o p e r a t i o n s a r e n o r m a l l y c a r r i e d o u tus ing po in te r s . S uch po in te r s a re a ssoc ia t ed wi th spec if i c(abso lu t e ) dev ice addresses .( c) C + + . L i k e C , p o in t e r s c a n b e u se d t o p e r f o r m h a r d -ware op e ra t ions . In m any cases machine -spec if i c ope ra -t ions a re de f ined in com pi l e r -spec i f i c l i b ra ry c l a sses .d) Modula-2. T h e S Y S T E M m o d u l e e n s u r e s t h a t d a t a

    t y p e s u se d i n c o n j u n c t i o n w i t h h a r d w a r e ( e. g. B Y T E ) a r ema de ava i l ab le . Devices a re iden t if i ed a s it ems loca ted a tabso lu t e addresses . Device access i s pe r formed us ings t r a i g h t f o r w a r d a s s i g n m e n t o p e r a t i o n s t o / f r o m su c hi tems.

    e) Oberon-2. O b e r o n - 2 , l i k e M o d u l a - 2 , a s su m e s t h a tsu c h f e a t u re s a r e i m p l e m e n t a t i o n d e p e n d e n t , b e i n g su p -p l ie d i n t h e S Y S T E M l ib r a r y . D e v i c e a c c es s i s p e r fo r m e du s i n g s t r a i g h t f o r w a r d a s s i g n m e n t o p e r a t i o n s t o / f r o msuch i t ems.Bit manipulationa) Ada. T h e b i t p a t te r n s o f in d i v i d u al w o r d s c a n b e

    spec i fi ed us ing enu me ra t ion represen ta t ion c l auses . I t isa l so p o s s ib l e t o f o r m a w o r d a s a n a r r a y o f B o o l e a ne lement s , each e l ement cor re sponding to a s ing le b i t .T h e s t a n d a r d l o g ic a l o p e r a t io n s m a y b e a p p l i e d t o su c hs t ruc tures .

    (b ) C. C i s pa r t i cu la r ly s t rong in th i s a rea . Log ica l AN D ,O R , N O T a n d X O R c a n b e c a r r i e d o u t i n b i t w i s efash ion . Moreover , b i t sh i f t i ng , bo th l e f t and r igh t , canb e p e r f o r m e d .

    ( c ) C + + . I n C + + t h e s a m e f a c i l i t i e s a r e p r o v i d e d a s i nC. I t a l so , however , suppor t s a d i f fe ren t approach us ings t ruc tures dec la red a s b i t f i elds .d) Modula-2. In Modula -2 the se t s t ruc ture i s used for

    b i t h an d l in g . F o r e m b e d d e d a p p l i c a ti o n s t h e m o s t u se f u lcons t ruc t i s BITSET . Thi s , i n P IM , i s de f ined a s a se t o fenumera ted ca rd ina l va lues . A l l s t anda rd se t ope ra torscan be used wi th B ITSE T. A s a re su l t b i t handl ing i s easyto pe r form, except fo r b i t sh i f t i ng . The new s t anda rdr e m e d i e s t h is , a n d a l so p ro v i d e s a R O T A T E f u n c t io n .e) Oberon-2. O b e r o n - 2 c o n s i d e r s su c h o p e r a t i o n s t o b e

    low- leve l ones , and hence implementa t ion dependent .S u p p o r t f o r t h e se i s p r o v i d e d i n m o d u l e S Y S T E M ,which has prede f ined procedures for l og ica l sh i f t andro ta t e .Interrupt handlinga) Ada. H e r e t h e s t a n d a r d m e t h o d o f d e a li n g w i t h in t e r-

    rup t s i s t o c rea t e an in t e r rup t handle r t a sk . An in t e r rup tvec tor i s a ssoc ia t ed wi th the t a sk by loca t ing the t a skent ry a t t he vec tor address .(b ) C. There a re no s t anda rd cons t ruc t s i n C for dea l ingwi th in t e r rup t s . U se rs f requent ly dev i se the i r ownsolu t ions incorpora t ing a ssem bly l anguage ins t ruc t ions .(c ) C + + . C + + d o e s n o t d ef in e a s ta n d a r d m e t h o d o fin t e r rup t handl ing . Ho wev er , compi l e r- spec i f ic ex ten-s ions a re o f t en prov ide d for t he wr i t i ng of i n t e r rup th a n d le r s . P r o g r a m m e r s m a y u se t h e se o r e ls e p r o v i d ethe i r own handle r .d) Modula-2. I n t e r r u p t s a r e h a n d l e d i n M o d u l a - 2 u s i n gt h e s t a n d a r d p r o c e d u r e I O T R A N S F E R , p r o v i d e d b y

    m o d u l e S Y S T E M . A l t e r n a t i v e l y , p r o g r a m m e r s m a ywr i t e t he i r own handle r s .e) Oberon-2. I n t e r r u p t o p e r a t i o n s a r e e n c a p su l a t e d

    wi th in a c l ea r ly iden t i f i ed in t e r rup t p rocedure . Thi s i st h e n a s so c i a t e d w i th t h e a p p r o p r i a t e i n t e r r u p t v e c t o rus ing an ins t a l l a t ion mechani sm such as :I n s ta l l ( I n te r r u p t P r o c e d u r e , I n t e r r u p t V e c t o r N u m b e r ) ;Such procedures a re to be rega rded a s be ing inhe ren t lyunsa fe owing to i ssues of por t ab i l i t y .Pointers

    Al l t he l anguages prov ide po in te r ope ra t ions .

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    7/11

    J.E. Cooling~MicroprocessorsSpecif ication o f t ime delays

    This i s ac tua l ly a much more complex i ssue than i ta p p e a r s t o b e . H o w d e l a y s a r e i m p l e m e n t e d i s c l o se l yl inked wi th the ove ra l l t a sk s t ruc tur ing of t he sof tware .W h e n t h e so f t w a r e i s c o n s t r u c t e d a s a m u l t i t a sk i n gsys t em, the so lu t ion i s r e l a t ive ly s imple . Respons ib i l i t yfor gene ra t ing the necessa ry t ime de lays i s g iven to theexecut ive /ope ra t ing sys t em. Thi s i s t he approach used inAda , us ing the de l ay s t a t ement . O the rwise i t i s l e f t t othe des igne r t o implement t ime de lays in the mosta p p r o p r i a t e m a n n e r . N o r m a l l y t h is i n v o lv e s t h e u seo f h a r d w a r e t i m e r s a n d i n te r r u p ts . T h u s , p r o v i d e dhardware access and in t e r rup t con t ro l f ea tures a resuppl i ed , h igh- l eve l l anguage t ime de lay cons t ruc t scan be dev i sed .

    and Microsystems 20 1996) 67-77 7(b) C: T o q u o t e f r o m t h e A N S I r a t i o n a l e d o c u m e n t [ 1 5 ]' m a n y o p e r a t i o n s a r e d e f i n e d t o b e h o w t h e t a r g e tm a c h i n e ' s h a r d w a r e d o e s i t r a t h e r t h a n b y a n a b s t r a c tru l e '. T hus i t is no t poss ib l e to de f ine , in an abs t rac t way ,w h a t sh o u l d h a p p e n w h e n a C p r o g r a m e x e c ut e s. Im p l e -menta t ion de ta i l s must be t aken in to account . As aresu l t, a C prog ram which wo rks pe r fec t ly we l l on on emach ine m ay fa i l when por t ed to a d i f fe ren t one . S imi l a rprob lems ma y a r i se i f d i f fe ren t compi l e r s a re used . Th i s i sno t surpr i s ing a s t he ANSI s t anda rd l i s t s one page ofunspec i f i ed behaviour , seven pages of undef inedbehav iour , an d one pag e of l oca le - spec if i c behaviou r .

    M o r e o v e r , t h e l a n g u ag e s t r u c t u r e s p r o v i d e m a n y w a y sof gene ra t ing s ide-ef fect s. A com prehens ive a ssessmen to f t h e b e h a v i o u r o f C p r o g r a m s i s g i ve n b y H a t t o n [ 16 ].

    Processor (or env ironm ent) spec if ic ex tensions to the corelanguageI t can be seen f rom the preced ing t ex t t ha t t he core

    l anguage must be ex tended to t a i lo r fea tures to spec i f i cimplem enta t ions . Thi s can be done in two ways . F i r s t , a sw i t h A d a , M o d u l a - 2 a n d O b e r o n - 2 , a n i m p l e m e n t a t i o n -sp e c i f i c S Y S T E M m o d u l e c a n b e p r o v i d e d . S e c o n d ,ex tens ions can be prov ided us ing l anguage l i b ra r i e s .Idea l ly , a l l l i b ra r i e s should be de f ined wi th in thel anguage s t anda rd . Unfor tuna te ly the rea l i t y , a t t hepresen t t ime , i s f a r f rom idea l . Var i a t ion be tweencom pi l e r l ib ra r i e s is a ma jor source of por t ab i l i t yp r o b l e m s .

    ( c) C + + : I S O / I E C 9 8 9 9 l is ts o n e p a g e o f un sp e c if i edb e h a v i o u r a n d m o r e t h a n f o u r p a g e s o f u n d e f i n e dbehaviour . Thi s i s an unsa t i s fac tory s i t ua t ion . Morete l l ing is the tutor ia l by C argi l l [14] wh ich ident i f ies 50spec if ic po in t s w or th y o f cons ide ra t ion .( d ) M o d u l a - 2 : There a re few undef ined a spec t s o ri n sec u r it ie s i n t h e P I M v e r s i o n o f M o d u l a - 2 . T h e n e wstandard i s even more r igorous .( e ) O b e r o n - 2 : O b e r o n - 2 i s st i l l evolving, but does notinc lude unspec i f i ed or undef ined behaviour . I t hasr e m o v e d so m e o f th e i n sec u r it ie s o f P I M M o d u l a - 2 .

    3 .3. Pr ima ry f ea ture s Strong data typingWel l de f ined language standard(a) Ada: Yes.(b) C. Yes . Bu t be aware o f the d i f fe rence be twe enconforming and s t r i c t ly conforming compi l e r s .

    (a) Ada. A d a h a s v e r y s t r o n g d a t a t y p i n g r u l e s . T y p em i x i n g is f o r b i d d e n ; t y p e c o n v e r s i o n m u s t b e p e r f o r m e df i r s t . A l l convers ion ope ra t ions a re fu l ly de f ined tope rmi t fu l l compi l e r checking . However , t o dea l w i thlow- leve l ope ra t ions , unchecked type convers ion i spe rmi t t ed . Thi s should be used wi th grea t ca re .

    ( c ) C + + : Yes, but st i l l evolving.(d ) Modula -2 : Yes, bu t few comp i l e r s ava i l ab le whichm e e t t h e I S O s t a n d a r d .(e) Oberon-2: Yes, bu t i n forma l . S t il l evo lv ing (O akw oo dstandard) .W ell de f ined behaviour

    A l l t h e l a n g u a g e s c a n p r o d u c e u n e x p e c t e d ( a n du n p r e d i c t e d ) b e h a v i o u r w h e n u s i n g p o i n t e r o p e r a t i o n s .I n p r a c t i c e t h i s i m p l i e s t h a t C a n d C + + p r o g r a m s a r el ik e ly t o p r o d u c e t h e g r e a te s t n u m b e r o f p r o b l e m s[13,14].(a ) Ada: There a re re l a t ive ly few implementa t iond e p e n d e n t o p e r a t i o n s i n A d a .

    (b) C: Th e da ta typ ing in C i s ex tremely wea k as i t can beb r o k e n i n m a n y w a y s . P a r t i c u l a r p r o b l e m s a r i s e w i t himpl i c i t t ype convers ion , unexpec ted compi l e r -gene ra t edc o n v e r s i o n , a n d t y p e - b r e a c h i n g t h r o u g h t h e u se o fpointers [2] .(c) C+ + . Thi s has t i gh te r t ype checking than C, i n tha t i tp r o v i d e s c h e c k in g t y p e s o f f u n c t i o n p a r a m e t e r s ( b u tthe re a re undef ined a spec t s t o the handl ing of suche r r o rs ) . C + + a l so h a s im p l i ci t ty p e c o n v e r s io n , a n dpoin te r s can be used to breach a lmost any type ru l e [14] .(d ) Modula -2 . Modula -2 i s , l i ke Ada , a s t rongly typedlanguage . No impl i c i t t ype -changing i s a l lowed; expl i c i tt y p e c o n v e r s i o n a n d t y p e t r a n s f e r m e c h a n i sm s a r ep r o v i d e d . T y p i n g r u l e s c a n b e b r e a c h e d w h e n u s i n grecords ; ca re i s need ed he re .

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    8/11

    7 J.E. Cooling/Microprocessors and Microsystems 20 1996) 67-77e ) O b e r o n - 2 : O b e r o n - 2 is also strongly typed. However,the object oriented features introduce new issues which

    must be considered.Rigo rously def ined control s tructuresa) Ada: Ada provides a full set of rigorous control

    structures supporting selection and repetition opera-tions. It also allows unconditional transfer of controlusing the GOTO < label > (although the label must bein scope). Unfort unately programmers can breach thecontrols in all cases by using the raise-exceptionconstruct.b) C: Selection and iteration constructs are provided in

    C. Care must be taken in using the switch statement toprevent fall-throug h to the next case. The for loop mustbe used most carefully. It is highly flexible, allowing theprogrammer to specify loop initial, continuation andterminating conditions. The constructs are highly abus-able and thus quite insecure [17,18]. Unconditionaltransfer of control can be made to a label within thesame function.c ) C + + : This is similar to C.d ) M o d u l a - 2 : Both selection and iteration are supported

    in a fairly rigorous manner. Care must be taken with theCASE statement to include an ELSE clause. Uncondi-tional transfer of control can be made in two ways. EXITand RETURN. EXIT is used to jump out of a loop;RETURN can be used to terminate a procedure. Usethese carefully.e) Oberon-2: This is similar to Modula-2.

    M odu lar s tructur ing and separate compilat ion featu res

    c ) C + + : A C++ program consists of a collection ofcompilation files. Such files may be header files thatdeclare interfaces. Otherwise they are program filesthat define class, function and global variable imple-mentations. Like C, every program must have a functionmain. Individual files can be separately compiled.Modularity is not explicitly supported, but it can beprovided by encapsulation in classes. These are unitswhich encapsulate type representation and operationsto act on objects of that type.d ) M o d u l a - 2 : Here programs are structured as sets of

    program and library modules. The program module canbe considered to be the highest level program unit. Thiscalls on facilities provided by library modules. Eachlibrary module actually consists of two individual -but related - modules: definition and implementation.Modules are separately compilable units. Type checkingand name resolution is strongly enforced.e ) O b e r o n - 2 : O b e r o n - 2 has, strictly speaking, only one

    module type, the implementation. There is no concept ofa prog ram module. The interface of any module can belisted in a definit ion file. However, this is not an Oberon-2 module, merely a list of all exported items.Except ion handl ing constructsa) Ada: This provides, as standard, a comprehensive

    error handling mechanism. It deals with both language-defined and user-defined error conditions.b) C: There aren t st andar d exception handling facilities

    in C. These must be implemented by the programmersusing some form of uncontroll ed jump: e.g. goto, return,break or continue.

    a) Ada: The major program units of Ada are the sub-program, package, task and generic. However, the basicunits of compilation are the subprogram and package.All such units can be compiled separately, and there isstrong type-checking across units. There are no globaldata areas. Scoping rules are rigorous and well defined.b) C: The C equivalent to an Ada subprogram is thefunction. Here the function main is the highest-level

    one, normally calling on the use of other functions. Iden-tifier scope is related to storage class. External variablesare global. Those within a function are local to the func-tion, and by default are dynamic.Local variables can be made static by defining themusing the class specifier static. Variables declared at thetop of a file (a global) can be kept local to the file by usingthe static specifier. Note , however, that such rules can beovercome by using pointers.

    c ) C + + : Version 3.0 (and the ANSI draft standard) nowsupports exception handling. Its operation is based onan expression that throws an exception to be caughtby a handler. The basic approach is to supporttermination rather than resumpt ion semantics.d) Modula-2: There are no standard exception handling

    mechanisms defined in PIM Modula-2. Ma ny compilersprovide some run-time error detection and handlingmechanisms (e.g. overflow, array violations, etc.).Programmer-defined mechanisms can be supplied usingcoroutines for handling exception responses. The newstandard will define an exception handling mechanism.e) Oberon-2: There are no standard error handlingfeatures in the language. These could be implemented

    using the library module Coroutines .

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    9/11

    J.E. Cooling~Microprocessors and Microsystems 20 1996) 67-77 75Facili t ies to develop task structures(a) Ada: O n e o f t h e s t a n d a r d b u i l d in g b l o c k s o f A d a i st h e t a s k . T h e s e f o r m a n i m p o r t a n t a n d i n t e g r a l p a r t o fthe l anguage .(b) C: There i sn t an iden t i f iab le t a sk s t ruc ture a s such ,bu t these can be bu i l t us ing func t ions . Wi th th i sa p p r o a c h , t a s k a c c es s a n d m a n i p u l a t i o n m a y b e c a rr i e dby po in te rs .( c ) C + + : T a s k s c a n b e i m p l e m e n t e d u s i n g c l a s s e s a n dclass ins tances .(d ) Modula -2 : H e r e t a s k s a r e c o n s t r u c t e d u s i n g t h ep r e d e f i n e d t y p e P R O C .(e) Oberon-2. Tasks can be bu i l t us ing c l a s ses and c l a s sins tances .R T E X / R TO S i n te r fac ing

    I t s h o u l d b e p o s s i b le t o i n t e rf a c e p r o g r a m s d e v e l o p e di n a ll th e s e l a n g u a g e s t o s t a n d a r d R T E X s / R T O S s .Spec i f i c in t e r fac ing me thods va ry , bu t typ ica l ly involvet h e u s e o f a b s o l u t e a d d r e s s i n g t e c h n i qu e s . H o w e v e r , t h istop ic i s h igh ly implementa t ion-dependent . A l so , t her e a li t y o f c u r r e n t p r a c t i ce i s t h a t m o s t e m b e d d e d s y s t e m sdes igne rs use vendor -spec i f i c - and n o t s t anda rd i s ed -p r o d u c t s .M e m o r y e x h a u s ti o n c h e c k sThere a re two aspec t s to cons ide r he re : s t a t i c andd y n a m i c a l lo c a t i o n o f m e m o r y .S ta t i c ( f ixed s i ze ) a l loca t ion i s ma in ly used for s t acka n d t a s k w o r k s p a ce s . N o n e o f t h e la n g u a g e s p r o v i d e , ass t a n d a r d , m e t h o d s t o t e st f o r s ta t ic m e m o r y e x h a u s t i o n .H o w e v e r , t h e s e a r e f r e q u e n t l y i n c l u d e d a s c o m p i l e rsuppl i ed run- t ime checks .

    A d a i s t h e o n l y l a n g u a g e w h i c h c h e c k s f o rd y n a m i c m e m o r y e x h a u s t i o n u s i n g t h e e x c e p t i o nS T O R A G E E R R O R . I n al l o t h e r c a se s , a l lo c a ti o n a n dd e a l l o c a t io n o f d y n a m i c m e m o r y i s th e r e s p o n s i b il i ty o ft h e p r o g r a m m e r . R e c l a m a t i o n o f u n u s e d b u t n o t de a l -loca ted s to re (ga rbage co l l ec t ion) i s normal ly l e f t t o thep r o g r a m e x e c u t i o n e n v i r o n m e n t ( e . g . t h e O b e r o ne n v i r o n m e n t ) .Def ined maths f ac i l i ti e s(a ) Ada: A d a h a s a g o o d m a t h s m o d e l . T h e b e h a v io u r o fp r o g r a m s , w h e n r u n n i n g o n a n y p a r t i c u l a r p r o c e s s o r ,can ( in gene ra l ) be checked aga ins t t he mode l .( b ) C : T h e l a n g u a g e s u p p o r t s i n t e g e r a n d f l o at in g p o i n to p e r a t i o n s . H o w e v e r , t h e m a t h s m o d e l i s i n s e c u r e a sthe re a re a num ber of s ign i f ican t a spec t s which l ead to

    u n d e f i n e d b e h a v i o u r . F o r i n s t a n c e , t o q u o t e t h e A N S Is tandard : The beh avio ur i s undef ined in the fo l lowingc i rcums tances : an a r i thm et i c op e ra t ion i s i nva l id ( such asd iv i s ion or modulus by O) or p roduces a re su l t t ha tc a n n o t b e r e p r e s e n t e d i n t h e s p a c e p r o v i d e d ( f o rexample , un der f low o r ove r f low) .( c ) C + + : S i m i l a r c o m m e n t s a p p l y t o C + + , a l t h o u g hgeneral ly i t i s superior to C.(d ) Modula -2 : As spec i f i ed in P IM, the ma ths mode l i si m p l e m e n t a t i o n d e p e n d e n t . C a r e m u s t b e t a k e n t o c h e c ksuch a mode l , and to cons ide r por t ab i l i t y a spec t s . Then e w s t a n d a r d i s q u i t e a c o m p r e h e n s i v e a n d r i g o r o u sone .(e) Oberon-2: At the presen t t ime the ma ths mode l i sd e f i n e d m a i n l y i n t h e O a k w o o d i m p l e m e n t a t i o n r e c o m -menda t ions . These represen t the bas i s fo r a good ma thsmode l . However , t he cur ren t s i tua t ion i s t ha t ma thsb e h a v i o u r is i m p l e m e n t a ti o n d e p e n d e n t .3.4. Secondary featur esSyn tax and l ayou t(a) Ada: G o o d r e a d a b i l i t y w a s a b a s i c r e q u i r e m e n t o fthe l anguage . Thus i t s syn tax i s based on Engl i sh- l ikecons t ruc t s , avo id ing c ryp t i c no ta t ion . I t i s we l l de f ined ,u s i n g a c o m b i n a t i o n o f p l a in l a n g u a g e a n d B a c k u s - N a u rF o r m ( B N F ) o f n o t a ti o n . T h e l a n g u a g e i s n o t c a s esensitive.(b) C: The syntax of C i s fu l ly spec i f i ed in the ANSIs t a n d a r d . H o w e v e r , t h e o p e r a t o r s y m b o l s a r e u n c o n -vent iona l , ope ra t ions have complex precedence ru le s ,a n d p r o g r a m s a r e o f t e n w r i t t e n i n a t e r s e ( s o m e w o u l dsay c ryp t i c ) s ty le [19] . In prac t i ce , C p rogra ms a ref requent ly d i f f i cu l t t o read ( i t has been desc r ibed a s awri te-only language). The language is case sens i t ive .

    ( c ) C + + : I f a n y t h in g t h is l a n g u a g e i s m o r e u n r e a d a b l et h a n C . C + + s y n t a x h a s, i n es s en c e , e x t e n d e d t h a t o f Cw i t h s o m e c o m p l e x O O P c o n s t r u ct s . T h e l a n g u a g e i s c a s esensitive.( d ) M o d u l a - 2 :M o d u l a - 2 was des igned to b e h igh ly read-ab le , and i s we l l de f ined . P IM uses ex tended BNF( E B N F ) n o t a t i o n . I n t h e n e w s t a n d a r d i t i s d e f i n e dus ing the forma l spec i f i ca t ion l anguage VDM (ViennaDeve lopment Method) . I t i s case s ens i t ive .( e ) O b e r o n - 2 : O b e r o n - 2 i s v e r y r e a d a b l e , t h o u g hperhap s no t qu i t e so c l ea r a s Mod ula -2 . I t s syn tax i sd e f i n e d u s i n g E B N F a n d , l i k e M o d u l a - 2 , i s c a s esensitive.

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    10/11

    7 J.E. Cooling~Microprocessors and Microsystems 20 1996) 67-77M ult i task ing - language and run- t ime supporta) Ada: These aspects are an integral part of the Ada

    language. However, it is not a requirement that programsuse the predefined run-time support mechanism.

    e) Oberon-2: At the present time Oberon-2 has arelatively small set of standard libraries. It is expectedthat this will be extended in due course.Objec t oriented programming construc ts

    b) C: No dedicated multitasking facilities or supportmechanisms exist within the language.c ) C + + : A deliberate decision was made to omitmultitasking features from the language. These may be

    provided within a library or as a compiler extension.d) Modula -2 : PIM Modula-2 implements coroutines. It

    also provides sets of signals which may be used toconstruct more powerful multitasking features. Thenew standard is much more comprehensive.e) Oberon-2: The Oakwood guidelines recommend alibrary for the support of coroutines. This is intended

    to be an optional feature.Interfac ing to fore ign high leve l languagesAll the languages here can be interfaced to otherlanguages. However, even where such mechanismsare defined within the language, they tend to beimplementation dependent.A subse t fo r safe ty-cri t ical appl icat ionsa) Ada: Yes, primarily thro ugh SPA RK Ada [5].b) C: Seems highly unlikely [2], but has its supporters [16].c ) C + + : Doubtful , but it is being worked on.d) Modula -2 : Not devised, but could be readily

    achieved.

    a) Ada: Ada 83 is considered to be an object-based lan-guage. It enables the programmer to devise abstract datatypes (ADTs) using packages (for encapsulation), privatetypes and subprograms to operate on such types. Ada 95[20] adds: Type extension - for inheritance. Late (dynamic) binding - for selection of operations at

    run time. Polymorphism - for selection of types at run time.b ) C + + : This has an extensive range of OOP features,

    including classes, objects, methods, messages, inheritanceand dynamic binding (in some C++ texts, late bindingand polymorphism are taken to be synonymous).c) Oberon-2: This also has a good range o f OOP features:

    classes, objects, methods, messages, inheritance anddynamic binding. However, the class attributes are some-what different to those of C+ +, being much simpler.

    4 Assemb ly language programm ingIt is strongly recommended that, wherever possible,

    assembly language programming should be eliminated.There are many reasons for this, including: Source code documentation - quantity andcomplexity. Weak data typing, poor control of scope, limited flow

    control mechanisms. Maintenance and portability problems.

    e) Oberon-2: As for Modula-2.Comprehensive s tandard l ibrarya) Ada: A good basic library.b) C: Very comprehensive library, but beware ofincompatible implementations (those conforming but

    not strictly conforming to the standard).c ) C + + : Again, very comprehensive, but majorconcerns relating to compatibility.d) Modula -2 : Very comprehensive library range

    available, but again real problems of compatibility incurrent implementations. This is rectified by the newstandard.

    Some of these problems can be overcome (orminimised) by using a structured assembler.However, there will always be a need to use assembly

    language. The most obvious case is where a high levellanguage isn t available. Even when an HL L is provided,there are situations where assembly language may still bepreferred, viz.: Testing of hardware. Interru pt and device/subsystem handling. Efficiency of operat ion - speed and code size.

    5 ConclusionWhat of the future? Where do we go from here? Is anyone language going to totally dominate the real-time

    scene? These are difficult questions to answer, but

  • 5/24/2018 Languages for the Programming of Real-time Embedded Systems

    11/11

    J .E. C ool ing~Microprocessors and Microsystem s 20 (1996) 67-7 7b a se d o n c u r r e n t t r e n d s t h e f o l lo w i n g o u t c o m e is a R e f e r e n c e sreasonable pred ic t ion .a) Ada: In de fence , ae rospace , av ion ics and s imi l a r

    appl i ca t ions , Ada wi l l be dominant . The l anguageseemed to lose groun d ( in Eu rope ) in the ea r ly 90 s , bu tn o w a p p e a r s t o b e h a v i n g so m e w h a t o f a r e n a is s a n c e(based on pe rsona l d i scuss ions w i th too l vendors) . I twi l l a lso f ind increased use in safety-cr i t ical systems.b) C: This w i l l con t inue to be the dominant l anguage in

    e m b e d d e d a p p l i c a t i o n s . F o r P C a n d w o r k s t a t i o n a p p l i -ca t ions i t w i ll r ema in ex t remely impor t an t , a l t houg h he rei t i s l ik e ly t o l o se g r o u n d t o C + + .c ) C + + : T h i s w il l b e t h e m o s t i m p o r t a n t l a n g u a g e f o r

    works t a t ion appl i ca t ions . I t w i l l , t o a somewha t l e sse re x t e n t , b e a m a j o r l a n g u a g e f o r t h e d e v e l o p m e n t o fP C - b a se d sy s t e m s . V isu a l C + + w i ll b e ex t r e m e l y w i d e l yu se d f o r th e b u i l d in g o f G U I s . H o w e v e r , o u r o w ne x p e r ie n c e [ 2 1] h a s i n d i c a te d t h a t C + + o b j e c t c o d e c a ne a s i l y b e c o m e l a r g e a n d c o m p l e x : su c h c o n c e r n s m a yl imi t i t s pene t ra t ion in to the embedded f i e ld . Onein te res ting poss ib i l i t y is t he dev e lopm ent o f an e f fec t ive ,eff ic ient subset of the language.d) Modula-2: The l anguage ( inc lud ing i t s Pasca l o f f -

    sh o o t s ) is o n a p l a t e a u o f u se ( a lt h o u g h t h e r e a p p e a r st o h a v e b e e n a m a j o r u p t a k e i n e a s t e rn E u r o p e i n th e l a s tt w o y e a r s) . T h e n e w s t a n d a r d m a y l e a d to n e w c o m p i l e r sbe ing produced; one s ign i f i can t app l i ca t ion a rea i s t ha tof sa fe ty-c ri t ica l sys t ems.e ) O b e r o n - 2 : O b e r o n - 2 has a ve ry br igh t fu ture in theresea rch and e duca t ion f i e lds [22] . Fur th e rm ore , p ro-

    v i d e d a r e a so n a b l e r a n g e o f c o m p i l e rs b e c o m e a v a i la b l e ,i t should ca rve i t se l f a n i che mark e t i n indus t r i a l andc o m m e r c i a l sy s t e m s ( m a n y d e v e l o p e r s w o u l d l i k e ag o o d a l t e r n a t i v e t o C + + o r A d a ) . I t a l so h a s g r e a tpo ten t i a l fo r use in sa fe ty-c r i ti ca l app l i ca t ions .

    W h a t w e a r e a l so b e g in n i n g t o s e e a r e p r o j e c ts w h e r eso f t w a r e h a s b e e n d e v e l o p e d i n a n u m b e r o f l a ng u a g e s .O n e ( n o t so n e w ) a p p l i c a t i o n i s m u l t i p l e - r e d u n d a n tp r o c e s so r sy s t e m s , a s i n t h e A 3 2 0 A i r b u s [ 2 3 ]. A m o r er e c e n t o n e i s t h e d e v e l o p m e n t o f t h e c o n t r o l sy s t e m f o rt h e n e w L o n d o n U n d e r g r o u n d Ju b i l e e l i n e . H e r e t h ec r i ti ca l sof twa re is be ing wr i t t en in Ada , C + + be ingused e l sewhere .

    cknowledgementsT h i s p a p e r w a s f ir s t p r e se n t e d a s p a r t o f t h e T E M P U Sp r o j e c t P r o g r a m sk a O p r e m a z a V o d e n j e P r o c e so v , h e l da t t he Univ e rs i ty o f L jub l j ana , S lovenia , Feb . 1995 . I t is

    r e p r o d u c e d w i t h p e r m i s s io n .

    77

    [1] A .D . S toye nko, The e volu t ion a nd s ta te-of - the a r t o f r e a l - tim elanguages, J. Syst . So f tw. 18 1992) 61-84.[2] W.J . Cul lye r , S . J. Good e noug h a nd B .A Wic hm a n, The c hoic e ofcomputer languages in safe ty-cr i t ica l systems. Sof tw. Eng . J .Ma rc h 1991, 51-58 .[3] W.A. H a la ng a nd A .D . S toye nko, Com pa ra t ive e va lua t ion ofhigh-level rea l- t ime programming languages , Real-Time Syst . 21990) 365-382.[4] J .D. Ichbiah, J .G.P. Barnes , J .C. Heliard, B. Krieg-Brueckner ,O . R oubin e a nd B .A . Wic hm a nn, Ra t iona le for the de s ign of theA D A p r o g r a m m i n g l an g u a g e , Pro c . AC M, 1 4 June 1979) .[5] SPARK - The SPADE Ada Ke rne l , P rogra m Va l ida t ion L td . ,S o u t h a m p t o n , U K .[6] B.W. Kernig han and D .M. Richie , The C Programming Language,Prentice-Hall , Englewo od Cliffs , NJ, 2nd edn. , 1988.

    [7] B . S t rous t rup , A His tory of C ++ : 1979-1991, A C M S I G P LA NNot . 28 Ma rc h 1993) 271-297.

    [8] W . Wirth, Pro gra m m in g i n MO D U LA- 2 , Springer-Verlag, Berlin,4th edn. , 1988.[9] G. Nelson ed. ) , Sys tems Programming with Modula-3, Prentice-Hall , Eng lewood Cliffs, NJ, 1991.

    [10] M. Reisser, T H E O B E R O N S Y S T E M - U s er G u id e a n d P r og ra m -mer's Manual , Addison-We s le y , Re a ding , MA , 1991.[11] H . Mosse nboc k, Object-Oriented Programm ing in Oberon-2,Springer-Verlag, Berlin, 1993.[12] B. Kirk ed.), The O akwood Guidelines for Oberon-2 Compi lerDevelopers, First Issue September 1994)[13] A. Koe nig, C Trap s a nd Pitfa l ls , A T T Bel l Laboratories

    Computer Science Technical Report No. 123, New Jersey, July1986.[14] T. Cargill , C+ + Gotch as , C 4 - Wo r ld , Dallas , October 1993,2 - 7 8 .[15] Ra t iona le for Dra f t Propose d Am e r ic a n Na t iona l S ta nda rd forInform a t ion Sys te m s - Progra m m ing La ngua ge C , ANSI ,

    1988.[16] L. Hatton, SA FE R C: Developing Sof tware for High-in tegri ty and

    Safety-crit ical Systems, Mc Gra w -Hi l l , Ne w Yo rk , 1994.[17] A.D . H il l , The choice of prog ramm ing languages for highlyre l iable sof tware - a comp arison of C and Ada, Ad a U se r , 1 2Ma rc h 1991) 11-31 , 92-103.[18] P .H . W e lc h , G OI NG TO Ce e d? , Internal report, C o m p u t i n g

    La bora tory , U nive r s i ty of Ke n t a t Ca nte rbury , J a nu a ry 1989.[19] I . Pohl and D. Edelson, A TO Z: C language shortcomings,Comput. Lang. 13 Fe brua ry 1988) 51-64 .

    [20] J . Barnes, Object-or ien ted program ming : Ad a 9 X offersflexibility and reliability, A l s y s W o r m D i a l 7 Spring 1993)4 - 5 .[21] K . W a rdle y , Em be dd e d system s progra m m ing wi th C++ , M . S c .

    project report, Dept. o f Elec tronic and Elec tr ica l E ngineering ,Lough borough Unive r s i ty , Se pte m be r 1993.[22] Proc. Advances in Modular Languages, University of Ulm,

    Germany, September 1994.[23] J .P. Poto cke de M onta lk, C om pute r sof tware in c ivi l a ircraf t ,

    Microprocessors Microsyst. 17 Ja nua ry /Fe b rua ry 1993) 17-24 .

    Jim Cooling specialises in the area o f real-timeembedded computer systems, including hard-ware, software and systems aspects of thetopic. He has published extensively on the sub-]ect, being the author of a number of textbooksrelating to embedded systems. Currently he is asenior lecturer with the Department of Electro-nic and Electrical Engineering, LoughboroughUniversity of Technology.