Implementation Approach

Our approach to supporting understanding and adaptation is predicated upon a library of predefined patterns, which can be stored in the reuse library along with the reusable software components. Domain analysis techniques can be used to acquire the knowledge embedded in the patterns. Given this representation of domain knowledge, understanding can be implemented as the recognition of these patterns, while adaptation can be implemented as the substitution of alternative patterns for certain existing ones. For example, in the message assembly pattern described above, it might happen that, due to new capacity considerations, the space to store incomplete messages should not be assumed to be memory resident. In response, the very simple substitution of a paged memory abstract data type for the RAM can be made.

The architecture for a system to support understanding and adaptation thus has four key components: a representation for patterns capturing domain knowledge, an understanding algorithm for recognizing these patterns in software components, an adaptation algorithm for substituting one pattern for another, and a domain analysis component. This is shown in Figure 3.

\begin{figure}\vspace{3in}
\end{figure}

This work is motivated by two techniques from AI: planning and case-based reasoning. Planning is concerned with the representation of a rationale for actions in a data structure called a plan. There are similarities between the patterns describing the deep structure of a program and the plan describing the rationale for actions. Case-based reasoning is a framework for using existing solutions to past problems as a way to solve new problems that happen to be similar. There is a direct correspondence with the library-based reuse processQone merely substitutes ``case memory'' for ``library'' and ``solution'' for ``software component''. Our work on adaptation addresses the problem of modifying existing cases to fit new problems. Modifying the ``plan'' of an old case serves as the theory for modifying the case itself.

The research described here, which is in an early stage, is directed at processes that are central to all reuse scenarios. It extends the focus of reuse beyond issues of library organization and retrieval. The difficulties of software reuse in the current software development paradigm raise fundamental questions about the nature of software parts and their interconnections. We hope to gain some insight on these questions from developing support for the processes of understanding and adaptation.