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 / biggerstaff.ascii < prev    next >
Text File  |  1993-10-19  |  14KB  |  256 lines

  1.     Biggerstaff - 1
  2.  
  3.     Biggerstaff - 1
  4.  
  5.  
  6.  
  7. The Limits of Concrete Component Reuse
  8.  
  9. Ted J. Biggerstaff
  10.  
  11. Microsoft Research
  12. One Microsoft Way
  13. Redmond, WA 98052-6399
  14. Tel: (206) 936-5867
  15. Email: tedb@microsoft.com
  16.  
  17. Abstract
  18.  
  19. This paper takes the position that the formal representation options 
  20. available today for expressing reusable components -- notably, 
  21. programming languages -- are excessively concrete (even with all of their 
  22. advertised abstraction facilities such as classes and generics). And this 
  23. concreteness imposes a built-in barrier to widespread and high payoff 
  24. reuse of those components. The proposed solution to this problem  is 
  25. representations that allow improved deferral of implementation details 
  26. (i.e., additional levels of abstraction) and allow for the automatic 
  27. generation of those details at component reuse time.
  28.  
  29. Keywords: Concrete components, repositories, limitations, payoff.
  30. Workshop Goals: To explore the notions of new representational abstractions for reuse components 
  31. and the concomitant requirement for generative architectures to support those abstractions.
  32. Working Groups: Domain analysis/engineering representations.
  33.     
  34.  
  35. 1   Background
  36.  
  37. I have done research on reuse and related topics (e.g., design recovery) since 
  38. 1983 and this has resulted in a number of books, papers and systems. Most 
  39. recently, I have been working in the area of representations that can enhance 
  40. the reusability of components and yet allow most of the reuse to happen 
  41. automatically. This work has led me to consider the limitations of the current 
  42. concrete (i.e., programming language) representations  for reusable 
  43. components.
  44.  
  45. 2   Position
  46. 2.1  Hypothesis
  47.  
  48. Reuse in its various forms has had a number of notable successes1 and a 
  49. number of apparent failures. In a previous article [2], I analyzed the key 
  50. factors that lead to reuse success or failure. These included factors such as the 
  51. scale of the component, the narrowness of the application domain, the 
  52. minimization of the component interconnection architecture (e.g., the data 
  53. flow structures) and the standardization of the data items (i.e., the data 
  54. structures that flow between components) shared among the components in a 
  55. library. But there is another factor that was not discussed in that article and 
  56. one that introduces serious limits on reuse. That factor is the level of 
  57. concreteness (or lack of abstraction2) of the reusable component.
  58.  
  59. 2.2  What are Concrete Components?
  60.  
  61. Concrete components are those that express the operational meaning of the 
  62. component in enough detail that  it can be translated into an implementation 
  63. oriented form such as a compiled function or object with little or no 
  64. additional information. To the degree that a component needs additional 
  65. information and to the degree that that additional information will cause 
  66. extension and/or restructuring of the resulting implementation form, we will 
  67. consider that component to be abstracted to some degree. For example, 
  68. macros, templates and generics represent kinds of components that require 
  69. additional information and exhibit extension and/or restructuring in the 
  70. process of achieving their final implementation form. 
  71.  
  72. Another test for concreteness is the amount of generation used by the reuse 
  73. system in the course of developing the resulting implementations. If their is 
  74. very little generation required and components are mostly just plugged 
  75. together, then the components are truly concrete. 
  76.  
  77. Generally, concrete components are expresses in conventional programming 
  78. languages which by their very definition foster concreteness. In fact, I believe 
  79. that the representations available today for representing reusable components 
  80. are the central reason for the limitations inherent in today's reusable libraries.
  81.  
  82.  
  83.  
  84. 2.3  Limitations of Representation
  85.  
  86. Why should concreteness have a deleterious effect on reuse? Because concrete 
  87. representational forms require implementation oriented details that are 
  88. needed by the compiler but could easily be deferred until later in the design 
  89. process. Worse, premature introduction of implementation details (which often 
  90. represent arbitrary design choices made in the absence of definitive 
  91. requirements) precludes many opportunities for reuse. How often have you 
  92. heard  "I should be able to reuse this component but it is just too slow (or 
  93. large, or a variety of other factors) for my  application. "  More often than not, 
  94. such reasons are perfectly valid and a potential reuse is lost because concrete, 
  95. implementation details have been introduced too early -- before the 
  96. opportunity for reuse, not after. 
  97.  
  98. This premature introduction of implementation details is a direct result of the 
  99. representations available for expressing reusable components -- programming 
  100. languages. Today's programming languages are largely  concrete and therefore, 
  101. make abstraction difficult and limit its form and degree. Let us consider the 
  102. modes of abstraction that are available to the builder of a reuse library -- 
  103. classes (e.g., in Smalltalk or C++), macros (e.g., in C) , generics (e.g., in Ada) 
  104. and general templates (as described in [5]).
  105.  
  106. Classes are conventionally thought of as abstractions and that term is even 
  107. applied to describe them. But classes are already implementation-oriented 
  108. components. Their detailed algorithms are chosen and although hidden, these 
  109. show through to the application in terms of their performance, size, error 
  110. handling design, memory management schemes, etc. [3] That is, the 
  111. information may be hidden but the implementation properties show through 
  112. and it is these concrete properties that can  have great (generally, negative) 
  113. effect on the reusability of the components. So, while object orientedness is 
  114. highly beneficial to reuse, it imposes built-in limits on the degree to which 
  115. objects may be reused and thereby, on the expected payoff through reuse. OK, 
  116. let's look further. What about macros? 
  117.  
  118. Macros certainly have the potential to be powerful tools but they are limited 
  119. by the design considerations of the languages in which they are embedded. 
  120. That is, programming languages are designed according to principles that are 
  121. somewhat antithetical to reuse.  Take C for example. The language was 
  122. designed to allow the maximum flexibility to the programmer not the 
  123. maximum abstract-ability of the code. So macros in languages like C are quite 
  124. limited and have little to offer as a representation for reuse. As an example of 
  125. the key limitations of macros in languages like C, consider the requirements of 
  126. generative reuse architectures. Generative reuse architectures often 
  127. conditionally generate alternative code streams based on the type of, or on a 
  128. declared property of a data item, and typically, they apply such conditional 
  129. generation recursively.  C macros allow neither capability let alone allow it to 
  130. be applied recursively. Consequently, while quite useful, C-like macros are far 
  131. too limited as a reuse representation candidate. 
  132.  
  133. Generics are an improvement on C-like macros.  But generics can only vary 
  134. based on data types and, in Ada for example, only on the built-in types. This 
  135. limitation to built-in types is probably in Ada because the emphasis in the 
  136. design of the Ada  language was validation based on type consistency which 
  137. would mean that the compiler would have to have the type inference rules 
  138. built-in so that it could do type inference efficiently. But the downside of this 
  139. limitation is that one cannot abstract generics to the degree desired. Even 
  140. abstraction based on user defined types would help but it too would fall short 
  141. of the needs of abstraction for reuse. Consequently, while generics are a step in 
  142. the right direction, they do not go far enough. OK, what about general 
  143. templates that vary based on types including user defined types.
  144.  
  145. Templates add a powerful level of abstraction but they too fall short of what is 
  146. needed simply because highly abstract components must vary based on 
  147. properties that fall outside of the type system. For example, consider two 
  148. coupled design decisions -- the choice of the implementation data structure for 
  149. a very long strings  (i.e., choosing between an array versus linked list 
  150. implementation) and the choice of the substring search algorithm (e.g., 
  151. choosing between a linear search versus Knuth-Morris-Pratt algorithm). The 
  152. performance consequences can be onerous if the choice of implementation 
  153. data structure and the choice of search algorithm are made independently, 
  154. without considering the performance interactions3. Therefore, when I am 
  155. choosing the implementation data structure for the string, I would like to be 
  156. able to have my generation algorithm test the implementation property of the 
  157. string search algorithm (i.e., is it linear search or KMP) and under some 
  158. conditions to revise the choice of search algorithm.  Types are not a good way 
  159. to encode that information but general properties associated with the program 
  160. are and this is the way DRACO [4] dealt with this kind of abstraction problem. 
  161.  
  162. 2.4  Representational Abstraction
  163.  
  164. In conclusion, if reuse is to escape the bounds of concrete representations it 
  165. must move beyond static, concrete representations. It must include the ability 
  166. to develop a rich representation of the target program that goes beyond 
  167. today's programming languages (e.g., allows arbitrary extra-linguistic 
  168. properties on any structure) and allows general manipulation and 
  169. reorganization of the program at the level of DRACO.
  170.  
  171. If implementation details are truly deferred in reusable components, then the 
  172. control skeletons of many low level algorithms within those components (e.g., 
  173. the string search algorithm from the earlier example) may not exist in any 
  174. concrete form at the time that the component is entered into a reuse library. 
  175. The control structures and their details may only be generated in concrete 
  176. form when the component is reused within a specific application context. In 
  177. short, abstract representations that can truly defer implementation details 
  178. must by necessity be coupled to powerful generation systems that can derive 
  179. much of the detail, concrete structure with only a minimal involvement from 
  180. the user. And it is only by such abstraction and generation that reuse can 
  181. surpass the limitations that currently restrict its payoff.
  182.  
  183. 3  Comparison
  184.  
  185. This view of reuse falls somewhere between the fully generative view where all 
  186. of the componentry is completely built into the generation system and the 
  187. fully compositional view where all of the componentry is explicitly and 
  188. completely defined by the end users4 of the system. Visual BasicTM   is a good 
  189. example of a fully generative reuse system and the Foundation Classes for 
  190. Microsoft's C compiler, which defines a set of reusable components that 
  191. simplify WindowsTM  programming, is a good example of the fully 
  192. compositional view. The view of representation that is most similar to the view 
  193. expressed in this paper is that of Neighbors [4]. Within  Neighbor's DRACO 
  194. system, there is a set of clearly identifiable componentry (expressed in domain 
  195. oriented languages) that the programmer can change and manipulate, but 
  196. there is also a generative mechanism (i.e., a transformation engine) that is 
  197. driven by some of the components (i.e., those that are expressed as 
  198. transformations). This architecture allows the DRACO user to develop 
  199. components that are far more abstract than possible with current 
  200. programming languages.
  201.  
  202. While the view of this paper targets roughly the level of component abstraction 
  203. in DRACO, it differs from the DRACO view in a couple of ways. It accepts a 
  204. larger user involvement in the decision making that controls the generation of 
  205. the concrete implementations and therefore, it anticipates a generative system 
  206. that is somewhat less general and less automated than the DRACO model. The 
  207. details of such a model and the generative architecture that it requires await 
  208. the answers to the representation research, which will determine whether or 
  209. not this ideal is achievable.
  210.  
  211. References
  212.  
  213. [1]    Batory, D.S., "Concepts for  a Database Compiler", ACM PODS, 1988.
  214.  
  215. [2]    Biggerstaff, T.J., Microelectronics and Computer Technology Corporation, 
  216. "An Assessment and Analysis of Software Reuse", in Advances in Computers, 
  217. Vol. 34, Academic Press, 1992.
  218.  
  219. [3]    Berlin, L., "When Objects Collide", OOPSLA, 1990.
  220.  
  221. [4]    Neighbors, J., "DRACO: A Method for Engineering Reusable Software 
  222. Systems", in Software Reusability, ACM Press, 1989.
  223.  
  224. [5]    Volpano, D. and Kieburtz, R.B., "The Templates Approach to Software 
  225. Reuse", in Software Reusability, ACM Press, 1989.
  226.  
  227.  
  228.  
  229. 4  Biography
  230.  
  231. Ted J. Biggerstaff is Research Program Manager of the Intentional Programming 
  232. Project at Microsoft Research Laboratories. He is responsible for exploring ways 
  233. of enhancing reuse capabilities of application development. Before coming to 
  234. Microsoft, he was Director of Design Information at MCC where he led the 
  235. research and development of the DESIRE design recovery system. Before that, he 
  236. worked for ITT's programming laboratory (on reuse) and Boeing Computer 
  237. Service's Advanced Technology and Application Division (on CASE tools). He 
  238. received a Ph.D. in Computer Science from the University of Washington in 
  239. 1976.
  240.  
  241. 1Problem specific application generators such as GENESIS [1], more general 
  242. application tool kits such as Visual BasicTM, fourth generation languages such as 
  243. dBase, and many others.
  244. 2I am using abstraction in its most general form and thus, while our use includes 
  245. object-oriented programming as a special case, we intend abstraction to have its  
  246. general, non-jargon meaning.
  247. 3The advantage of the KMP search algorithm arises out of the ability to avoid 
  248. comparisons for many substrings (i.e., the ability to jump over some substrings) 
  249. within the long search string. A linked list implementation eliminates most of this 
  250. advantage and makes sequencing through the strings an expensive operation.
  251. 4 Or at least personnel that are closer to the end user than to the developer of the 
  252. reuse system. The author recognizes that the population of the reuse library is 
  253. frequently not done by end users (i.e., application developers) but rather by domain 
  254. analysts.
  255.  
  256.