Analogical Reuse of Object-Oriented Analysis Models
MetadataShow full item record
Software reuse involves using again software artifacts that have been successfully built before. To be successful with software reuse, techniques for reuse must be integrated into both the information system development process and the programming environment. If potential reuse can be identified early in an information system development process, the gain in development time can be substantial. Techniques to automatically identify reuse candidates incorporated in software development tools would increase the benefits for software development even more. In this dissertation the incorporation of reuse techniques based on analogical reasoning (AR) in tools for software development is proposed. These techniques use information about the structure and semantics of a model from the analysis of a software system to try to identify potential analogous models. Analogical reasoning is typically described as consisting of a set of phases. Although other AR phases are equally important, the focus of this thesis is on the retrieval and mapping phases of AR. The proposed approach is demonstrated using OOram role models. OOram is an object-oriented modelling notation resembling UML sequence diagrams. OOram models were chosen because they focus entirely on the analysis of a problem and does not take into consideration what objects will play the various roles in the system. The findings in this thesis are applicable also for such models. A user creates a role model during the analysis of a new project. To prevent too much detailed work at this stage, it would be advantageous if a tool could support the process by identifying reusable candidates from a software development repository. The proposed approach implements support for a tool that can search a repository for models that are analogous to the model being created. The user must then evaluate the identified models to see if they are suitable within the project. AR is used to identify similar cases from different problem domains. A similarity model for OOram role models that uses a combination of structural and semantic information about the models to identify similarities is proposed. At the time the ROSA project was initiated, this was a natural choice. The requirements of the similarity model are that it is able to distinguish potentially useful models from the ones that cannot be reused. In the approach suggested in this thesis, each named component in the model repository is linked to a word meaning in a term space. This term space is modelled after WordNet, an electronic, lexical database. During retrieval, information about structure and semantics of the models is used. All new role models are given a structure description before they are stored in the repository. This information is, during retrieval, used as an index. Semantic similarity among models is during retrieval found by identifying distance in the semantic network. An upper bound for the semantic similarity between a target model and each of the base models in the repository is identified, and this result is combined with a structural similarity, based on the structure descriptions, to form a retrieval similarity. During the mapping phase, the most promising base models after retrieval are compared to the target model. Mapping between a target and each of the retrieved base models is done using a genetic algorithm that tries to optimize the mapping between the two models based on their structure and semantics, resulting in a mapping similarity. The balance between semantics and structure in the similarity model is vital both during retrieval and mapping. Experiments are described in which analogies are identified between a target model and the models in a repository containing 133 models. In this context a good analogy for a role model is a role model for which we calculate a high mapping similarity. This implies that the models have similar structure, and roles that are positioned at comparable positions in the structures have similar semantics. In 21 of 24 cases, the model with the highest mapping similarity is identified from among the top 30 ranked models during retrieval. Experiments also show that if considering the 5 highest ranked models according to mapping similarity in each of the 24 cases, more than 85 % of them will be localized among the top 30 ranked models after retrieval. The findings reported show that the suggested approach is viable, although further studies are necessary. The top ranked model may prove not to be the best analogy after further analysis. The user must evaluate the mappings.