Information access tools for software reuse

Software reuse has long been touted as an effective means to develop software products. But reuse technologies for software have not lived up to expectations. Among the barriers are high costs of building software repositories and the need for effective tools to help designers locate re-usable software. While many design-forreuse and software classification efforts have been proposed, these methods are cost-intensive and cannot effectively take advantage of large stores of design artifacts that many development organizations have accumulated. Methods are needed that take advantage of these valuable resources in a cost-effective manner. This paper describes an approach to the design of tools to help software designers build repositories of software components and locate potentially re-usable software in those repositories. The approach is investigated with a retrieval tool, named CodeFinder, which supports the process of retrieving software components when information needs are ill-defined and users are not familiar with vocabulary used in the repository. CodeFinder uses an innovative integration of tools for the incremental refinement of queries and a retrieval mechanism that finds information associatively related to a query. Empirical evaluation of CodeFinder has demonstrated the effectiveness of the approach. Information Access Tools for Software Reuse Scott Henninger -2August 1, 1995 1. Finding Examples in Software Repositories The goal of increasing programmer productivity through software reuse has proven to be elusive [1, 2, 3]. Although many approaches have been suggested [4], none of them have yet reached the critical point at which the cost of reuse is equal to or less than the effort to create new code. The problems are numerous, including the fact that an existing piece of code rarely fits exactly, that a programmer does not know what code is available, and that once the code is found it is difficult to understand how it works or how it can be used [3]. Although the research approaches are numerous, ranging from generative (languages, application generators, program transformations) to compositional approaches (libraries of components), most reuse efforts in place today center around libraries of reusable components in compositional frameworks. While current dissatisfaction with library-based reuse has caused many researchers to look for methods involving the reuse of larger components and different frameworks [1], libraries of software components will remain a viable technology with a broad base of applicability. But librarybased reuse faces an inherent conflict: to be useful, many components must exist, but when many examples are available, finding and choosing an appropriate one becomes troublesome. The large number and diversity of objects increases the chances that an object closely related to a problem task exists. However, finding such an object among so many becomes difficult. Improved retrieval systems for finding and exploring software repositories can potentially improve the overall effectiveness of library-based reuse. 1.1 Retrieving Software Components Most research on information retrieval systems have focused on searching for literature references, where pre-defined relationships between words and concepts or the regular structure of language can be used to effectively retrieve relevant documents [5, 6]. But little attention has been given to the representation of non-text data [7] such as software components, which present some special problems not found in text-based retrieval systems. Software source code has arbitrary rules of grammar that are different from natural language and allows the use of non-words and esoteric abbreviations. For example, the mail system described later in this paper uses the abbreviation ‘mp’ for a “message pointer” throughout the system’s source code and documentation. Information retrieval techniques that rely on pre-defined word meanings would not be able to accommodate such an abbreviation and will in general find it difficult to adapt to idiosyncratic word definitions used in source code. The differences in the linguistics of source code and the fact that clear and accurate documentation is often not readily available reduce the effectiveness of automatic indexing schemes, which rely on selfdescriptive document contents. The use of templates to ensure effective text for retrieval [8, 9] is a partial solution whose effectiveness is proportional to the quality of documentation. Free-text indexing has been applied to the domain of Unix man pages [10], where documentation for the code is conveniently available. But the circumstances surrounding this type of application, in which an Information Access Tools for Software Reuse Scott Henninger -3August 1, 1995 enormous effort has taken place over many years to document code for users, is rare and uncharacteristic of most software development efforts. Because of the difficulty of applying free-text methods to software, the conventional wisdom is that software components must be organized in some manner so they can be found. The most popular approach for augmenting representations of software components is to construct a classification scheme. Retrieval can then be accomplished by choosing the right category or browsing a graphical display of category hierarchies. The LaSSIE system [11] uses knowledge-based techniques in a frame-based approach to classifying software components. Retrieval is performed by classifying the query and returning objects subsumed by the query. The result is a weak form of inferencing based on inheritance (infer that everything subsumed by the query is relevant) and classification (frame instantiation). Sommerville and Wood [12] presented a similar frame-based approach based on conceptual dependency, an artificial intelligence representation scheme for natural language understanding. Prieto-Diaz’s [13] software classification scheme uses a faceted organization of classes consisting of groupings of terms. Instead of creating a static hierarchy of classes and subclasses, faceted classification allows the synthesis of facets into multi-element classes by choosing terms within each facet. Six facets are identified for describing software components. A user must construct a query consisting of six terms, one for each facet, which is then applied to a relational model to retrieve software components. AIRS (AI-based Reuse System) combines the faceted and frame-based classification systems to retrieve components by their similarity to a query represented by frame attributes [14] In spite of these efforts, software library classifications have proven to be notoriously cryptic and esoteric, causing library users to “feel more like a detective than a programmer” [15; p. 280]. Finding the “right” category is a difficult task because it involves a detailed understanding of the classification scheme, causing problems for all but the most expert user. Even well known classification systems, such as the Library of Congress, have been shown to be problematic for many users [16], and classifications that would seem to have one “correct” taxonomy, such as a biological species, need more than one structure to satisfy different information needs [17]. Effective use of faceted classification schemes requires an intimate understanding of the structure of the repository and the implications of query construction [15]. The need for extensive training procedures for both using and constructing facets remains a barrier to effectively applying faceted schemes for software retrieval [18]. While the main value of classification systems may be that they force developers to understand the problem and application domain [1], methods are needed that transcend strict hierarchical ordering of information in a flexible manner that better facilitates the process of finding relevant information. 1.2 Cost Effective Reuse Libraries The problems with classification systems do not end with usability issues. The challenge for software retrieval systems is to control the costs of creating and extending a repository while retaining enough structure to adequately support retrieval and the process of software reuse. Given the high costs of creating a classification scheme or knowledge bases, it is unclear how most software retrieval research Information Access Tools for Software Reuse Scott Henninger -4August 1, 1995 D2 D3