Measuring Aspect Cohesion

Cohesion is an internal software attribute representing the degree to which the components are bound together within a software module. Cohesion is considered to be a desirable goal in software development, leading to better values for external attributes such as maintainability, reusability, and reliability. Aspect-oriented software development (AOSD) is a new technique to support separation of concerns in software development. AOSD introduces a new kind of component called aspect which is like a class, also consisting of attributes (aspect instance variables) and those modules such as advice, introduction, pointcuts, and methods. The cohesion for such an aspect is therefore mainly about how tightly the attributes and modules of aspects cohere. To test this hypothesis, cohesion measures for aspects are needed. In this paper, we propose an approach to assessing the aspect cohesion based on dependence analysis. To this end, we present various types of dependencies between attributes and/or modules in an aspect, and the aspect dependence graph (ADG) to explicitly represent these dependencies. Based on the ADG, we formally define some aspect cohesion measures. We also discuss the properties of these dependencies, and according to these properties, we prove that these measures satisfy the properties that a good measure should have.

[1]  Martin Rinard,et al.  System Dependence Graph Construction for Aspect-Oriented Programs , 2003 .

[2]  Sandro Morasca,et al.  Defining and Validating Measures for Object-Based High-Level Design , 1999, IEEE Trans. Software Eng..

[3]  Yuming Zhou,et al.  A novel approach to measuring class cohesion based on dependence analysis , 2002, International Conference on Software Maintenance, 2002. Proceedings..

[4]  Lionel C. Briand,et al.  A Unified Framework for Cohesion Measurement in Object-Oriented Systems , 2004, Empirical Software Engineering.

[5]  Stanley M. Sutton,et al.  N degrees of separation: multi-dimensional separation of concerns , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[6]  Zhao Jianjun,et al.  Coupling Measurement in Aspect - Oriented Systems , 2003 .

[7]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[8]  Karl J. Lieberherr,et al.  Aspect-oriented programming with adaptive methods , 2001, CACM.

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

[10]  Lodewijk Bergmans,et al.  Composing crosscutting concerns using composition filters , 2001, CACM.

[11]  Doo-Hwan Bae,et al.  A cohesion measure for object‐oriented classes , 2000 .

[12]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[13]  James M. Bieman,et al.  Design-level cohesion measures: derivation, comparison, and applications , 1996, Proceedings of 20th International Computer Software and Applications Conference: COMPSAC '96.