home *** CD-ROM | disk | FTP | other *** search
/ ftp.umcs.maine.edu / 2015-02-07.ftp.umcs.maine.edu.tar / ftp.umcs.maine.edu / pub / WISR / wisr6 / proceedings / ascii / cornwell2.ascii < prev    next >
Text File  |  1993-10-19  |  17KB  |  359 lines

  1.  
  2.  
  3.  
  4.  
  5.                       Design  Reuse  for  Real-Time  Systems
  6.  
  7.  
  8.  
  9.                                    Pete Cornwell, Andy Wellings
  10.  
  11.  
  12.  
  13.                                  Department of Computer Science,
  14.  
  15.                                            University of York,
  16.  
  17.                                                 Heslington,
  18.  
  19.                                                     York,
  20.  
  21.                                                  YO1 5DD,
  22.  
  23.                                                       UK
  24.  
  25.  
  26.  
  27.                                         Tel:  (+44) 0904 432711
  28.  
  29.                                        Fax:  (+44) 0904 432767
  30.  
  31.                                Email:  cornwell@minster.york.ac.uk
  32.  
  33.  
  34.  
  35.                                                   Abstract
  36.  
  37.  
  38.     Real-time code is often structurally dependent on underlying hardware making it a poor
  39. candidate for reuse.  High-level languages aimed at real-time systems do little to alleviate this
  40. problem, indeed they often impose simplistic and inflexible models on development that further
  41. prohibits portability and reuse. We believe that a component-based approach to reuse is better
  42. achieved by working at the design level,specifically within an object-oriented framework. Ideally
  43. we wish to develop a reuse approach that facilitates the specification,evolution and composition
  44. of real-time components.
  45.     Our chosen notation is HRT-HOOD, an object-oriented method for real-time system de-
  46. sign developed at York.  Through HRT-HOOD  our wish isto develop a fully object-oriented
  47. architecture-centred reuse approach, integrating design with formal techniques to model and
  48. reuse the collaborative relationships between real-time components.  Architectures provide a
  49. reusable building plan for real-time system development to which the collaborative real-time
  50. behaviour of components must conform in order to participate within the architecture. Adap-
  51. tion  of  both  architectures  and  components  to  meet  changing  functional  and  non-functional
  52. requirements, is made possible through the use of two inheritance schemes that address the
  53. incremental specialisation of real-time collaborative structures and individual objects.
  54.  
  55.  
  56. Keywords: Reuse, Real-Time, Design, Architectures.
  57.  
  58.  
  59. Workshop Goals: Discussion of our ideas;Exposure to interesting and relevant work by others;
  60.  
  61.  
  62. Working Groups:  Reuse and OO methods, Design Guidelines for Reuse, Reuse and Formal
  63. Methods.
  64.  
  65.  
  66.  
  67.                                                  Cornwell- 1
  68.  
  69.  
  70. 1      Position
  71.  
  72.  
  73.  
  74. We believe that code is an inadequate form of representation for the reuse of high performance
  75. real- time components. Real-time code often has strict functional and non-functional requirements
  76. encompassing such diverse properties as concurrency, fault tolerance and distribution - which are
  77. further  bounded  by  hard  or  soft  temporal  constraints.  A "correct"  real-time  implementation  is
  78. where the specified functional and non-functional requirements are met with resp ect to the con-
  79. straints imposed by the underlying hardware environment.  In cyclic executive based systems that
  80. still  underpin  the  vast  majority  of  real-time  applications  a  successful  resolution  of  requirements
  81. against  constraints, made  possible  through  timing  and  schedulability  analysis  tends  to  result  in
  82. context-dependent code structured primarily to meet high performance criteria. As a consequence
  83. such systems do not adequately address the needs of comprehension and maintainability resulting
  84. in code that does not lend itself well to reuse.
  85.  
  86.  
  87. High level languages[HLL's], with the abstract modelling facilities theyoffer, tend to detract from
  88. rather than enhance the reuse potential of real-time code. Abstract constructs for expressing real-
  89. time characteristics often belie simplistic and inflexible implementation models.  To work around
  90. these limitations either compiler modification or the use of supplementary low-level code is a very
  91. real possibility; such alteration ties co de closely to the underlying hardware, limiting the possibilities
  92. for reuse.  The alternative restricts code to a particular model of real-time behaviourconsistent
  93. with its underlying implementation model.
  94.  
  95.  
  96. In other areas HLL real-time reuse support is correspondingly weak. The classic "plug and socket"
  97. approach to composition, matching procedural "plugs" to "sockets" presented in the public inter-
  98. face of an external component is totally inadequate for a real-time approach.  The classic "black
  99. box" approach to HLL component composition does not address performance issues,which remain
  100. hidden.
  101.  
  102.  
  103.  
  104. 2      Design Reuse
  105.  
  106.  
  107.  
  108. Our work attempts to address reuse at the design level by identifying those real-time characteristics
  109. that are reusable and capturing these at an abstract level, independent of a particular implemen-
  110. tation strategy.  Object-oriented design is our favoured development paradigm.  The advantages
  111. of object- oriented components are well known, but they also present a number of key properties
  112. useful for the modelling of real-time systems. These are:
  113.  
  114.  
  115.  
  116.     fflConcurrency :  the abstractasso ciation of pro cess and ob ject
  117.  
  118.  
  119.     fflFault Tolerance : An object defines a useful containment boundary for error detection and
  120.        recovery.
  121.  
  122.  
  123.     fflTiming :  temporal associations can be made with be public and internal methods.
  124.  
  125.  
  126.     fflDistribution :  The granularity of an object is ideal for distribution.
  127.  
  128.  
  129.  
  130.                                                         Cornwell- 2
  131.  
  132.  
  133. 2.1     HRT-HOOD
  134.  
  135.  
  136.  
  137. Our favoured notation is Hard Real-Time Hierarchical Ob ject-Oriented Design (HRT-HOOD), a
  138. variant of HOOD, developed at the University of York [1, 2 ]. HRT-HOOD defines a set of object
  139. types, each of which model a key real-time abstraction, these are:
  140.  
  141.  
  142.  
  143.     fflCyclic - an object with periodic activity.
  144.  
  145.  
  146.     fflSporadic - an ob ject with aperio dic activity.
  147.  
  148.  
  149.     fflActive - a non-real-time concurrent object.
  150.  
  151.  
  152.     fflProtected - a non-concurrent object that enforces mutual exclusion on shared resources.
  153.  
  154.  
  155.     fflPassive - a non-concurrent object.
  156.  
  157.  
  158.  
  159. These abstractions are supported by a rich set of synchronous and asynchronous object interac-
  160. tion mechanisms, allowing a wide spectrum of inter-ob ject behaviours to b e modelled. In order to
  161. maximise the reuse of detailed real-time design information, we require ascheme of design repre-
  162. sentation that effectively captures keyfunctional and non-functional real-time requirements in a
  163. format that is implementation-independent, and sufficiently concise and abstract in order to pro-
  164. mote rapid comprehension. To fulfil this aim we are currently evaluating a wide range of real-time
  165. formal notations, as a basis for the capture of detailed design information with HRT-HOOD.
  166.  
  167.  
  168. From  this  basis  we  are attempting  to  apply  an  object-oriented  approach  to  reuse  that  encom-
  169. passes real-time characteristics as well as purelyfunctional.  We have updated the original HOOD
  170. object-based  development  scheme  with  an  approach  that  is  wholly  object-oriented,  allowing  the
  171. derivation of real-time class types from which ob jects may be instantiated.  As HRT-HOOD is a
  172. decompositional approach we have designed two complimentary inheritance schemes:
  173.  
  174.  
  175.  
  176.     fflArchitectural  Design  Inheritance  [ADI] -  a  multiple  inheritance  scheme  designed  to  allow
  177.        the incremental specialisation and combination of abstract architectural class types at non-
  178.        terminal levels of a design decomposition. ADI allows the derivation of new class types that
  179.        combine the archtectures of each individual parent into a single abstraction.  From this basis
  180.        new  child  objects  may  be  incrementally  added  to  the  derived  class  type, which  may  draw
  181.        upon and use the services and resources inherited from the respective parent architectures.
  182.  
  183.  
  184.     fflDetailed Design Inheritance [DDI] - This is a multiple inheritance scheme forthe incremental
  185.        specialisation of detailed class types at the lowest or terminal level of a design decomposi-
  186.        tion.  In contrast to ADI, DDI is a scheme closely related to inheritance mechanisms at the
  187.        implementation level.  Its functional aspects allow the derivation of new class abstractions
  188.        conceptually built upon resources and methods provided by one or more parent class types.
  189.        From  this  inherited  basis  a  derived  class  type  may  incrementally  add  new  resources  and
  190.        services, specialising the new abstraction to encompass extended functional requirements.
  191.  
  192.  
  193.  
  194. For real-time applications, thepurely functional orientation of inheritance does not encompass the
  195. specialisation and reuse of important real-time characteristics. Through ADI we have introduced a
  196. scheme of architectural specialisation that allowsthe incremental addition of new real-time object
  197. abstractions  to  a  non-terminal  class  type.  Extending  inheritance  at  the  most  detailed  level  of
  198. development to encompass issues such asconcurrency, timing and fault tolerance is vital if we are
  199.  
  200.  
  201.                                                         Cornwell- 3
  202.  
  203.  
  204. to capitalise on the advantages for reuse offered by this valuable mechanism of class type extension
  205. and specialisation. DDI will therefore be the basis for the adaption of real-time components to meet
  206. new functional and non-functional requirements. We are currently developing a theoretical basis
  207. for the inheritance of concurrent threads of control within the constraints of a real-time framework,
  208. and hope to extend this to address both timing and failure issues in the near future.
  209.  
  210.  
  211.  
  212. 2.2     Architectures
  213.  
  214.  
  215.  
  216. Ultimately we hope to place these ideas within an architectural reuse framework; "No object is an
  217. island". We believe that greater reuse can be achieved by mo delling the collaboration relationships
  218. between objects as well as the component objects themselves. Complimentary to HRT-HOOD we
  219. hope to produce a scheme that is both decompositional and amenable to the inheritance principles
  220. outlined above. Our architectures are to be composed of slots, semantic specifications that define
  221. both the individual and collaborative behaviours that a reusable component must fulfill in order
  222. to occupy that slot. Our architectures will exhibit the following static characteristics:
  223.  
  224.  
  225.  
  226.     fflStructural - Outlining the slots of the architecture and the paths of interaction between them.
  227.  
  228.  
  229.     fflCompositional - Allowing slots to be decomposed into child architectures, that collectively
  230.        fulfil the semantic requirements of the parent slot.
  231.  
  232.  
  233.     fflDistributive - How the slots are partitioned onto physical processors.
  234.  
  235.  
  236.  
  237. Overlying the static structure are the following real-time functional and non-functional character-
  238. istics:
  239.  
  240.  
  241.  
  242.     fflConcurrent - Defining concurrent behaviour within and between slots.
  243.  
  244.  
  245.     fflFault Tolerance - Defining a consistent failure strategy in and between slots.
  246.  
  247.  
  248.     fflFunctional - Defining individual and collaborative functional characteristics.
  249.  
  250.  
  251.     fflTemporal - Defining timing requirements in and between slots.
  252.  
  253.  
  254.  
  255. Slots are "typed" according to their real-time characteristics and will conform to one of the HRT-
  256. HOOD object types aforementioned.  An architecture loosely conforms to a HRT-HOOD object
  257. at a non-terminal level of decomposition, containing slots that may in turn be decomposed into
  258. respective child architectures until the terminal level of the hierarchy is reached. Architectures at
  259. various points on the decompositional hierarchy are ideal units of reuse and may be extracted from
  260. their "native" environment and composed to develop new systems and subsystems.  Architectures
  261. are composed together by common components that demonstrate compliance with the syntactic
  262. and  semantic  requirements  of  a  slot  in  each  subsystem.  In  other  words  a  component  may  play
  263. different roles in distinct architectures, its very existence uniting them to form a coherent whole.
  264. In the highly concurrent, asychronous systems that will come to increasinglydominate real-time
  265. development an ideal candidate for architectural composition is the protected object,  a monitor-
  266. like construct encapsulating shared resources and the basis for communication between cyclic and
  267. sporadic components.  By capturing collaborative patternsof b ehaviour we ease the composition
  268. problem. Architectures define a building plan only allowing a component to participate if it fulfills
  269. the syntactic and semantic requirementsof a particular slot.  This is a significant shift in emphasis
  270. from  the  classic  component-centred  approach  to  reuse  and  ideal  for  the  modelling  of  real-time
  271. systems where the capture of high performance collaborative behaviour is vital.
  272.  
  273.  
  274.                                                         Cornwell- 4
  275.  
  276.  
  277. 3      Comparison
  278.  
  279.  
  280.  
  281.     1. Contracts  [3 ]  :  The  authors  provide  a textual  formalism  for  the  capture  of  collaborative
  282.        behaviours between inter-communicating objects called a contract.  A contract is composed
  283.        of participants that define the functional behaviour and type obligations that a class must
  284.        fulfil in order to be incorporated into the contract. The authors provide a formalism, called
  285.        a conformance declaration for the mapping of class inheritance trees to contract participants.
  286.        Contracts may be built in a "bottom up" fashion through the aggregation of existing contracts,
  287.        or modified through contract refinement, a scheme that allows the incremental specialisation
  288.        of one or more contract participants. Contracts essentially define architectural classes thatare
  289.        instantiated by existing class components.  The work of Helm, Holland and Gangopadhyay
  290.        is  fundamental  in  the  area  of  architectural  specification  and  reuse  and  contains  a number
  291.        of  important  concepts  that  we  would  hope  to  build  upon  in  our  own  work.  The  contract
  292.        notation  however  does  not  explicitly  address  real-time  architectural  specification, an  area
  293.        which we hope to investigate as part of future work.
  294.  
  295.  
  296.     2. Architectures With Pictures [4 ] : The authors present a common conceptual framework for the
  297.        development of real-time architectures through simple graphical notation. Architectures are
  298.        broadly classified as wired , with static paths of communication between objects or wireless
  299.        where the links are both dynamic and potentially transitory. Architectures are composed of
  300.        placeholders which define the semantic and syntactic properties a component must exhibit
  301.        in order to participate within a collaboration.  Placeholders are dynamic in the sense that
  302.        they may be occupied by different object components over time, furthermore they are subject
  303.        to hierarchical decomposition.  Collaborative behaviour is defined by a contract [3](i),  and
  304.        visualised through a simple timethread notation.  Timethreads arepaths of execution along
  305.        which time monotonically advances. These paths are traced through the design and represent
  306.        an order of execution, terminating when processing is complete. Buhr and Casselman consider
  307.        the  development  of  real-time  object-oriented  architectures  in  some  detail.  However, their
  308.        approach does not appear to explicitly address how inheritance, the primary mechanism of
  309.        ob ject-oriented reuse, can be integrated into a real-time architectural and component based
  310.        design framework.
  311.  
  312.  
  313.  
  314. References
  315.  
  316.  
  317.  
  318. [1]  A.  Burns  and A.  Wellings, "Hard  Real  Time  HOOD:  A  Design  Metho d  for Hard  Real-time
  319.      Ada9X Systems," Ada U.K. Technical Papers, 1991.
  320.  
  321.  
  322. [2]  A.  Burns  and A.  Wellings, "Hard  Real  Time  HOOD:  A  Design  Metho d  for Hard  Real-time
  323.      Ada," Journalof Real-Time Systems, vol. 6, pp. 73-114, 1994.
  324.  
  325.  
  326. [3]  R. Helm, I. Holland, and D. Gamgopadhyay, "Contracts: Specifiying Behavioural Compositions
  327.      in Object-Oriented Systems," ACM SIGPLAN Notices, vol. 25, pp. 169-180, October 1990.
  328.  
  329.  
  330. [4]  R. Buhr and R.Casselman, "Architectures with Pictures," ACM SIGPLAN Notices, vol. 27,
  331.      pp. 466-483, Octob er 1992.
  332.  
  333.  
  334.  
  335.                                                         Cornwell- 5
  336.  
  337.  
  338. 4      Biography
  339.  
  340.  
  341.  
  342. Pete Cornwell  is  a  graduate  from  Newcastle  University  and Bournemouth  Polytechnic, where
  343. he received a MSc in Software Engineering in 1991.  At the beginning of 1992 he began work as a
  344. Research Associate in Structured Design Methods for Real-Time Systems at the University of York,
  345. working on the HRT-HOOD project with Dr. Andy Wellings and Dr.  Alan Burns.  His research
  346. interests encompass design reuse, architectures, formal methods and reverse engineering. He is also
  347. registered as a Phd student at the University of York.
  348.  
  349.  
  350. Dr.  Andy  Wellings is a senior lecturer in the department of computer science at the University
  351. of York. His research interests cover a number of aspects of real-time system development including
  352. design, programming languages and distributed operating systems. He is the co-developer of the
  353. HRT-HOOD design notation (with Alan Burns), and has published over 100 technical papers and
  354. reports including three textbooks.
  355.  
  356.  
  357.  
  358.                                                         Cornwell- 6
  359.