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.
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.