Measuring size, complexity, and coupling of hypergraph abstractions of software: An information-theory approach
- 281 Downloads
Software development is fundamentally based on cognitive processes. Our motivating hypothesis is that amounts of various kinds of information in software artifacts may have useful statistical relationships with software-engineering attributes. This paper proposes measures of size, complexity and coupling in terms of the amount of information, building on formal definitions of these software-metric families proposed by Briand, Morasca, and Basili.
Ordinary graphs represent relationships between pairs of nodes. We extend prior work with ordinary graphs to hypergraphs representing relationships among sets of nodes. Some software engineering abstractions, such as set-use relations for public variables, are better represented as hypergraphs than ordinary (binary) graphs.
Traditional software metrics are based on counting. In contrast, we adopt information theory as the basis for measurement, because the design decisions embodied by software are information. This paper proposes software metrics of size, complexity, and coupling based on information in the pattern of incident hyperedges. For comparison, we also define corresponding counting-based metrics.
Three exploratory case studies illustrate some of the distinctive features of the proposed metrics. The case studies found that information theory-based software metrics make distinctions that counting metrics do not, which may be relevant to software engineering quality and process. We also identify situations when information theory-based metrics are simply proportional to corresponding counting metrics.
KeywordsSoftware metrics Size Complexity Coupling Properties of metrics Measurement theory Information theory Entropy Excess entropy C++ case studies
This work was supported in part by grant CCR-0098024 from the National Science Foundation. We thank Bell Canada for an academic license to use Datrix, a software measurement tool. We thank the Software Architecture Group of the University of Waterloo for providing the open-source tool cppx. We thank Shiva Juluru for providing the physics data manipulation program's source code. We thank Anthony Skjellum for providing pmlp source code. We thank Yoginder Dandass and Archana Chilukuri for help with pmlp measurement. We thank the Empirical Software Engineering research group at Mississippi State University for helpful discussions. We thank the anonymous reviewers for their helpful suggestions which significantly strengthened the paper.
- Abd-El-Hafiz, S.K. 2001. Entropies as measures of software information. In: Proceedings IEEE International Conference on Software Maintenance, Florence, Italy. IEEE Computer Society, pp. 110–117.Google Scholar
- Allen, E.B. 1995. Information theory and software measurement. PhD thesis, Florida Atlantic University, Boca Raton, Florida. Advised by Taghi M. Khoshgoftaar.Google Scholar
- Allen, E.B. 2002. Measuring graph abstractions of software: An information-theory approach. In: Proceedings: Eighth IEEE Symposium on Software Metrics, Ottawa, Canada. IEEE Computer Society, pp. 182–193.Google Scholar
- Allen, E.B., Khoshgoftaar, T.M. 1999. Measuring coupling and cohesion: An information-theory approach. In: Proceedings of the Sixth International Software Metrics Symposium, Boca Raton, Florida. IEEE Computer Society, pp. 119–127.Google Scholar
- Allen, E.B., Khoshgoftaar, T.M., Chen, Y. 2001. Measuring coupling and cohesion of software modules: An information-theory approach. In: Proceedings: Seventh International Software Metrics Symposium, London, England. IEEE Computer Society, pp. 124–134.Google Scholar
- Andersson, C., Thelin, T., Runeson, P., Dzamashvili, N. 2003. An experimental evaluation of inspection and testing for detection of design faults. In: Proceedings: 2003. International Symposium on Empirical Software Engineering, Rome, Italy. IEEE Computer Society, pp. 174–184.Google Scholar
- Bell Canada 2000a. Datrix Abstract Semantic Graph Reference-Manual (Version 1.4).Google Scholar
- Bell Canada 2000b. Datrix Metric Reference Manual. Montreal, Quebec, Canada, version 4.0 edition. For Datrix version 3.6.9.Google Scholar
- Birov, L., Prokofiev, A., Bartenev, Y., Vargin, A., Purkayastha, A., Skjellum, A., Dandass, Y., Erzunov, V., Shanikova, E., Ovechkin, V., Bangalore, P., Shuvalov, E., Orlov, N.F.A., Egorov, S. 1999. The Parallel Mathematical Libraries Project (PMLP): Overview, design innovations, and preliminary results. In: Proceedings of the Fifth International Conference on Parallel Computing Technologies.Google Scholar
- Briand, L.C., Daly, J.W., Wüst, J. 1997a. A unified framework for cohesion measurement in object-oriented systems. In: Proceedings of the Fourth International Symposium on Software Metrics, Albuquerque, New Mexico. IEEE Computer Society, pp. 43–53.Google Scholar
- Briand, L.C., El Emam, K., Morasca, S. 1997b. Reply to Comments to the paper: Briand, El Emam, Morasca: On the application of measurement theory in software engineering. Empirical Software Engineering: An International Journal 2(3):317–322. (See Briand et al., 1996a; Zuse, 1997a).CrossRefGoogle Scholar
- Chapin, N. 2002. Entropy-metric for systems with COTS software. In: Proceedings: Eighth IEEE Symposium on Software Metrics, Ottawa, Canada. IEEE Computer Society, pp. 173–181.Google Scholar
- Chen, Y. 2000. Measurement of coupling and cohesion of software. Master's thesis, Florida Atlantic University, Boca Raton, Florida. Advised by Taghi M. Khoshgoftaar.Google Scholar
- Dean, T., Malton, A., Holt, R. 2001. Union schemas as the basis for a C++ extractor. In: Proceedings: Working Conference on Reverse Engineering, Stuttgart, Germany.Google Scholar
- Fenton, N.E., Pfleeger, S.L. 1997. Software Metrics: A Rigorous and Practical Approach, 2nd edn. PWS Publishing, London.Google Scholar
- Gottipati, S. 2003. Empirical validation of the usefulness of information theory-based software metrics. Master's thesis, Mississippi State University, Mississippi State, Mississippi. Advised by Edward B. Allen.Google Scholar
- Govindarajan, R. 2004. An empirical validation of information theory-based software metrics in comparison to counting-based metrics: A case study approach. Master's thesis, Mississippi State University, Mississippi State, Mississippi. Advised by Edward B. Allen.Google Scholar
- Hilgard, E.R., Atkinson, R.C., Atkinson, R.L. 1971. Introduction to Psychology. Harcourt Brace Jovanovich, New York.Google Scholar
- Kim, K., Shin, Y., Wu, C. 1995. Complexity measures for object oriented program based on the entropy. In: Proceedings: 1995 Asia Pacific Software Engineering Conference, Brisbane, Australia. IEEE Computer Society, pp. 127–136.Google Scholar
- Li, M., Vitányi, P.M.B. 1988. Two decades of applied Kolmogorov complexity. In: Proceedings of the Third Annual Structure in Complexity Theory Conference, Washington, DC, pp. 80–101.Google Scholar
- Mayrand, J., Coallier, F. 1996. System acquisition based on software product assessment. In: Proceedings of the Eighteenth International Conference on Software Engineering, Berlin. IEEE Computer Society, pp. 210–219.Google Scholar
- Morasca, S., Briand, L.C. 1997. Towards a theoretical framework for measuring software attributes. In: Proceedings of the Fourth International Symposium on Software Metrics, Albuquerque, New Mexico, IEEE Computer Society, pp. 119–126.Google Scholar
- Munson, J.C., Khoshgoftaar, T.M. 1989. The dimensionality of program complexity. In: Proceedings of the Eleventh International Conference on Software Engineering, Pittsburgh, Pennsylvania. IEEE Computer Society, pp. 245–253.Google Scholar
- Oviedo, E.I. 1980. Control flow, data flow and program complexity. In: Proceedings: The IEEE Computer Society's Fourth International Computer Software and Applications Conference, Chicago, Illinois. IEEE Computer Society, pp. 146–152.Google Scholar
- Schütt, D. 1977. On a hypergraph oriented measure for applied computer science. In Digest of Papers: COMPCON 77 Fall, Washington, DC. IEEE Computer Society, pp. 295–296, Abstract only.Google Scholar
- Shereshevshky, M., Ammari, H., Gradetsky, N., Mili, A., Ammar, H.H. 2001. Information theoretic metrics for software architecture. In: Proceedings 25th Annual International Computer Software and Applications Conference, Chicago. IEEE Computer Society, pp. 151–157.Google Scholar
- University of Waterloo 2004. CPPX: Open source C++ fact extractor. http://swag.uwaterloo.ca/∼cppx. (Current July 7, 2006).Google Scholar
- van Emden, M.H. 1971. An Analysis of Complexity. Number 35 in Mathematical Centre Tracts. Mathematisch Centrum, Amsterdam.Google Scholar
- Visaggio, G. 1997. Structural information as a quality metric in software systems organization. In: Proceedings International Conference on Software Maintenance, Bari, Italy. IEEE Computer Society, pp. 92–99.Google Scholar
- Zuse, H. 1997b. A Framework for Software Measurement. Walter de Gruyter and Co., Berlin.Google Scholar