Software developers are justifiably wary of the effort involved in, and the difficulties inherent to, understanding and adapting software. Since these activities are so central to reuse in all its scenarios, we believe that there is a need for tools that support them directly.
Currently, understanding and adaptation are most frequently carried out using a text editor, whose operations manipulate character strings. The problem is that character strings are a lowest common denominator representation that does not capitalize on the special semantics of the type of text being manipulated. We are developing an alternative approach that explicitly employs knowledge of the application domain, programming constructs, and the mappings between them. Thus, instead of issuing a command to search for a character string, the developer can ask to see the ``message encryption functions''. And, instead of issuing commands to replace certain character strings with others, the developer can issue commands to ``add message acknowledgment'' or ``substitute a connectionless socket for the connection-oriented socket''. These two approaches are contrasted in Figure 2. In addition to differences in the level and power of the commands the developer uses, there are differences in the guarantees that can be made about the adapted component; a component adapted via editing may not even compile, while a component that is adapted in the alternate way should meet even higher standards than compilability. Our technical approach to achieving this model is described below.