Program execution based module cohesion measurement

Module cohesion describes the degree to which different actions performed by a module contribute towards a unified function. High module cohesion is a desirable property of a program. The program modifications during successive maintenance interventions can have negative effect on the structure of the program resulting in less cohesive modules. Therefore, metrics that measure module cohesion are important for software restructuring during maintenance. The existing static slice based module cohesion metrics significantly overestimate cohesion due to the limitations of static slicing. In this paper, we present a novel program execution based approach to measure module cohesion of legacy software. We define cohesion metrics based on definition-use pairs in the dynamic slices of the outputs. Our approach significantly improves the accuracy of cohesion measurement. We implemented our technique and measured module cohesion for several programs. Cohesion measurements using our technique were found to be more insightful than static slice based measurements.

[1]  Meir M. Lehman,et al.  A Model of Large Program Development , 1976, IBM Syst. J..

[2]  Edward Yourdon,et al.  Structured design , 1975 .

[3]  James M. Bieman,et al.  Measuring Functional Cohesion , 1994, IEEE Trans. Software Eng..

[4]  James R. Larus,et al.  Efficient path profiling , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[5]  Mark Weiser,et al.  Programmers use slices when debugging , 1982, CACM.

[6]  James M. Bieman,et al.  An empirical evaluation (and specification) of the all-du-paths testing criterion , 1992, Softw. Eng. J..

[7]  Glenford J. Myers,et al.  Structured Design , 1999, IBM Syst. J..

[8]  Linda M. Ott,et al.  The relationship between slices and module cohesion , 1989, ICSE '89.

[9]  E. J. Weyuker An empirical study of the complexity of data flow testing , 1988, [1988] Proceedings. Second Workshop on Software Testing, Verification, and Analysis.

[10]  Andrea De Lucia,et al.  A Specification Driven Slicing Process for Identifying Reusable Functions , 1996, J. Softw. Maintenance Res. Pract..

[11]  Joseph Robert Horgan,et al.  Dynamic program slicing , 1990, PLDI '90.

[12]  Elaine J. Weyuker,et al.  The Cost of Data Flow Testing: An Empirical Study , 1990, IEEE Trans. Software Eng..

[13]  Keith Brian Gallagher,et al.  Using Program Slicing in Software Maintenance , 1991, IEEE Trans. Software Eng..

[14]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[15]  Hyeon Soo Kim,et al.  Restructuring Programs through Program Slicing , 1994, Int. J. Softw. Eng. Knowl. Eng..

[16]  Elaine J. Weyuker,et al.  Selecting Software Test Data Using Data Flow Information , 1985, IEEE Transactions on Software Engineering.

[17]  Mary Lou Soffa,et al.  UNA based iterative test data generation and its evaluation , 1999, 14th IEEE International Conference on Automated Software Engineering.

[18]  David Lorge Parnas,et al.  Software aging , 1994, Proceedings of 16th International Conference on Software Engineering.

[19]  James M. Bieman,et al.  Estimating the number of test cases required to satisfy the all-du-paths testing criterion , 1989 .

[20]  James M. Bieman,et al.  Estimating the number of test cases required to satisfy the all-du-paths testing criterion , 1989, TAV3.

[21]  James R. Larus,et al.  Using Paths to Measure, Explain, and Enhance Program Behavior , 2000, Computer.

[22]  Janusz W. Laski,et al.  A Data Flow Oriented Program Testing Strategy , 1983, IEEE Transactions on Software Engineering.

[23]  T. J. Emerson A discriminant metric for module cohesion , 1984, ICSE '84.

[24]  James M. Bieman,et al.  A quantitative framework for software restructuring , 1999 .

[25]  Paolo Tonella,et al.  Concept Analysis for Module Restructuring , 2001, IEEE Trans. Software Eng..

[26]  Meir M. Lehman,et al.  Program evolution: processes of software change , 1985 .

[27]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[28]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1990, TOPL.

[29]  Aniello Cimitile,et al.  A Specification Driven Slicing Process for Identifying Reusable Functions , 1996, J. Softw. Maintenance Res. Pract..

[30]  Linda M. Ott,et al.  Slice based metrics for estimating cohesion , 1993, [1993] Proceedings First International Software Metrics Symposium.

[31]  Mary Lou Soffa,et al.  Automated test data generation using an iterative relaxation method , 1998, SIGSOFT '98/FSE-6.

[32]  James M. Bieman,et al.  Program slices as an abstraction for cohesion measurement , 1998, Inf. Softw. Technol..

[33]  James M. Bieman,et al.  A quantitative framework for software restructuring , 1999, J. Softw. Maintenance Res. Pract..

[34]  Victor R. Basili,et al.  Analyzing Error-Prone System Structure , 1991, IEEE Trans. Software Eng..