A Framework for Product Analysis Martin Hitz and Karin Neuhold Institut f. Angewandte Informatik und Informationssysteme, Universitaet Wien {hitz,neuhold}@ifs.univie.ac.at Abstract In order to analyze programs and highly structured design documents easily, it would be profitable to have a set of tools perform the analysis independently of the source language. For the area of object-oriented design and programming, we suggest a multi-purpose framework into which such tools may easily be integrated. It is possible to provide language independence by representing the relevant information within an information repository based on a meta-model. This meta-model should include the generality required to represent the commonalities of the object-oriented inputs as well as provide the expressive power to capture language-specific elements. This discrepancy between generality and specificity presents the main difficulty we are trying to resolve. 1. Introduction In the software development process, it is a point of necessity to conduct controlled, repeatable experiments in commercial contexts [3]. As Churcher and Shepperd state, software systems and the corresponding development processes have been accepted as an engineering discipline for more than two decades, however the rigid discipline to ensure quality products has not been fully implemented [9]. This is due mostly to the difficulty in expressing the many interrelationships which produce a quality product, as well as the difficulty in implementing a methodology to ensure that identified processes are adhered to by all persons involved in the development of such a product. In terms of Fenton's classification of measurable software engineering entities [7,8], we concentrate on measuring internal attributes of products. We want to be able to validate object-oriented software measurements by comparing different software products on an equal footing, as well as comparing different measurements. These software products will primarily consist of the source code of object-oriented programs, but should also include highly structured object-oriented design documents such as UML diagrams. A related aspect is the analysis of programs for reverse engineering purposes. Current research and development mostly goes in the direction of building tools which allow the application of software measures to programs written in specific object-oriented languages. Several tools of this type already exist. For example, Hatteras Software specializes in software measurements for Smalltalk and VisualAge programs with its product called OOMetric. The basis for this product can be found in [13] where Lorenz and Kidd describe measurements and give advice derived from a number of actual projects that have used object technology to deliver products. Object Technology Inc. offers a product, ENVY/QA for Smalltalk and VisualWorks, which includes some software measurements for programs written in these languages. Lionel Briand et al. [1,2] define a unified framework comprising a standardized terminology and formalism for representing both coupling and cohesion measures. They also provide an overview of the empirical validation work that has been undertaken for some of the discussed coupling and cohesion measures. However, no mention of the supported programming languages is made. Reiner Dumke and his Software Measurement Laboratory [6] specialize on analyzing C++ programs with their ObjecTool. Henderson-Sellers [10] specifies his Multidimensional Framework (MDF), but also does not mention which object-oriented languages are supported. 2. The Framework Our idea is to allow diverse representations of object-oriented software as input (e.g. C++ programs or UML documents) and to translate them into a representation which includes all information necessary for a subsequent analysis, be it a reverse engineering representation or the application of a software measurement. In an indiscriminate approach, the framework that we are implementing is split into three conceptual parts. The front-end consists of parsers for object-oriented programming languages and structured design documents. The output of these parsers is stored in an information repository as largely input-independent formal representation (meta-model) of the information pertinent to the possible analyses which may be applied to it. The clients (back-end) will consist of a collection of software measurement programs of internal attributes, reverse engineering tools and other analysis tools operating on object-oriented software. Additionally, the meta-model will also allow some input-dependent information to be stored, should the clients require such information. We call this an indiscriminate approach because the usefulness of many clients in the area of software measurements is not guaranteed, i.e. has not been proven [10, page 40]. As Henderson-Sellers states, no clear definition of what constitutes the characteristics of desirable software products has yet been proposed. Similar observations have been made in [11]. Different researchers have identified different properties that they believe a software product should have. These can be expressed as external attributes of a product. Such properties are usually not directly measurable. Therefore one goal is to find a link between the more easily measured internal attributes of software products and then to relate them to the external attributes. By implementing our framework we want to simplify experimentation in this context without having to expend much effort on implementation of analysis programs. Users of the framework should be able to integrate new analysis clients with a minimal amount of programming by exploiting the powerful API to the information repository. 3. Status This framework is being implemented as a research prototype on a Solaris workstation. For the implementation of the front-end we are trying to adapt existing parsers, such as GEN++ [5,4] for C++, to generate the internal representation. In an existing earlier prototype [12], a simplified precursor to this framework, we encountered problems with reliability and scalability when using commercial parsing products. We are attempting to use freely available software in our framework, as that would allow free dissemination and a wider range of experimentation for all. Currently we are working on parts of the implementation of the front-end and the specification of the meta-model for the information repository. Our approach is to analyze a wide variety of possible clients to identify the necessary characteristics which need be represented, as well as a variety of possible input formats. The overlap of these two sets will provide the information that must be represented in the information base. The application program interface of the information repository will be coded in C++. Therefore the back-end tools of the framework will most easily be implemented in C++ as well. The information repository will be in a persistent object-oriented database, however no specific product has been decided upon at this time. The software measurements to be implemented have been selected by trying to cover all of the external characteristics which seem relevant. For this, an attempt at relating internal attributes to external attributes is being made. 4. Open Problems (Lessons we would like to learn) What we can offer as our contribution to this workshop are our requirements for a meta-model. That is to say, we have concluded most of our analysis of the object-oriented elements which would need to be represented within such a model. The most challenging problem with respect to the design of the meta-model seems to be that it should allow the implementation of an information repository which primarily covers the common features available in all input languages in a uniform way, but at the same time also supports the representation of some essential language-dependent features. Bibliography [1] Lionel C. Briand, John W. Daly, and Juergen Wuest. A Unified Framework for Coupling Measurement in Object-oriented Systems. Technical Report ISERN-96-14, Fraunhofer Institute for Experimental Software Engineering, 1996. [2] Lionel C. Briand, John W. Daly, and Juergen Wuest. A Unified Framework for Cohesion Measurement in Object-oriented Systems. Technical Report ISERN-97-05, Fraunhofer Institute for Experimental Software Engineering, 1997. [3] Neville I. Churcher and Martin J. Shepperd. Towards a Conceptual Framework for Object-oriented Software Metrics. Software Engineering Notes, 20(2):69-76, 1995 [4] Prem Devanbu and Laura E. Eaves. How to Write a GEN++ specification, ATT, 1994. [5] Premkumar T. Devanbu. Genoa - A Customizable, Language- and Front-end independent code analyzer. In 14th International Conference on Software Engineering (ICSE-14), Melbourne, Australia, 1992. ACM. [6] Reiner R. Dumke, Erik Foltin, R. Koeppe, and A.S. Winkler. Measurement- based Object-oriented Software Development of the Software Project "Software Measurement Laboratory". Technical Report Preprint Nr. 6, Otto-von-Guericke-Universiaet von Magdeburg, 1996. [7] Norman Fenton. Software Metrics: A Rigorous Approach. Chapman-Hall, London, 1991. [8] Norman Fenton and Shari Lawrence Pfleeger. Software Metrics: A Rigorous and Practical Approach. International Thompson Computer Press, London, 1996. [9] Norman Fenton, Shari Lawrence Pfleeger, and Robert L. Glass. Science and Substance: A Challenge to Software Engineers. IEEE Software, pages 86-95, July 1994. [10] Brian Henderson-Sellers. Object-Oriented Metrics: Measures of Complexity. Object-Oriented Series. Prentice Hall, Upper Saddle River, NJ 07458, USA, 1996. [11] Martin Hitz and Behzad Montazeri. Measuring Product Attributes of Object- Oriented Systems. In Proceedings of the ESEC'95 (5th European Software Engineering Conference), LNCS 989, pages 124-136, Barcelona, Spain, September 25-28 1995. [12] Martin Hitz and Sabine Stiller. XOOM - Automatic Extraction of Object- Oriented Software Metrics. In Franz Lehner, Reiner Dumke, and Alain Abran, editors, Software Metrics. Gabler Verlag, Wiesbaden, 1997. [13] Mark Lorenz and Jeff Kidd. Object-oriented Software Metrics. Object- Oriented Series. Prentice Hall, Engelwood Cliffs, NJ, USA, 1994.