Abstract
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.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
The AspectJ Team. The AspectJ Programming Guide (2002)
Bergmans, L., Aksits, M.: Composing crosscutting Concerns Using Composition Filters. Communications of the ACM 44(10), 51–57 (2001)
Bieman, J., Ott, L.: Measuring Functional Cohesion. IEEE Transactions on Software Engineering 22(10), 644–657 (1994)
Briand, L.C., Daly, J., Wuest, J.: A Unified Framework for Cohesion Measurement in Object-Oriented Systems. Empirical Software Engineering 3(1), 65–117 (1998)
Briand, L.C., Morasca, S., Basili, V.R.: Defining and Validating Measures for Object-Based High-Level Design. IEEE Transactions on Software Engineering 25(5), 724–743 (1999)
Chae, H.S., Kwon, Y.R., Bae, D.H.: A Cohesion Measure for Object-Oriented Classes. Software Practice & Experience 30(12), 1405–1431 (2000)
Chen, Z., Zhou, Y., Xu, B., Zhao, J., Yang, H.: A Novel Approach to Measuring Class Cohesion Based on Dependence Analysis. In: Proceedings of the International Conference on Software Maintenance (October 2002)
Chidamber, S.R., Kemerer, C.F.: A Metrics Suite for Object-Oriented Design. IEEE Transactions on Software Engineering 20(6), 476–493 (1994)
Dufour, B., Goard, C., Hendren, L., Verbrugge, C., de Moor, O., Sittampalam, G.: Measuring the Dynamic Behavior of AspectJ Programs. Scable Technical Report No. 2003-8, McGill University and Oxford University (December 2003)
Hitz, M., Montazeri, B.: Measuring Coupling and Cohesion in Object-Oriented Systems. In: Proceedings of International Symposium on Applied Corporate Computing, Monterrey, Mexico, October 1995, pp. 25–27 (1995)
Kang, B., Bieman, J.: Design-Level Cohesion Measures: Derivation, Comparison, and Applications. Computer Science Technical Report CS-96-103, Colarado State University (1996)
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.M., Irwin, J.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Lieberher, K., Orleans, D., Ovlinger, J.: Aspect-Oriented Programming with Adaptive Methods. Communications of the ACM 44(10), 39–41 (2001)
Tarr, P., Ossher, H., Harrison, W., Sutton, S.M.: N Degrees of Separation: Multi- Dimensional Separation of Concerns. In: Proceedings of the International Conference on Software Engineering, pp. 107–119 (1999)
Yourdon, E., Constantine, L.: Structural Desing. Prentice-Hall, Englewood Cliffs (1979)
Zhao, J.: Toward A Metrics Suite for Aspect-Oriented Software. Technical Report SE-136-5, Information Processing Society of Japan, IPSJ (March 2002)
Zhao, J., Rinard, M.: System Dependence Graph Construction for Aspect- Oriented Programs. Technical Report MIT-LCS-TR-891, Laboratory for Computer Science, MIT (March 2003)
Zhao, J.: Coupling Measurement in Aspect-Oriented Systems. Technical Report SE-142-6, Information Processing Society of Japan, IPSJ (June 2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Zhao, J., Xu, B. (2004). Measuring Aspect Cohesion. In: Wermelinger, M., Margaria-Steffen, T. (eds) Fundamental Approaches to Software Engineering. FASE 2004. Lecture Notes in Computer Science, vol 2984. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24721-0_4
Download citation
DOI: https://doi.org/10.1007/978-3-540-24721-0_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21305-5
Online ISBN: 978-3-540-24721-0
eBook Packages: Springer Book Archive