Static Analysis for Dynamic Coupling Measures

Static Analysis for Dynamic Coupling Measures Yin Liu Ana Milanova Coupling measures have important applica- tions in software development and mainte- nance. They are used to reason about the structural complexity of software and have been shown to predict quality attributes such as fault-proneness, ripple effects of changes and changeability. Traditional object-oriented cou- pling measures do not account for polymorphic interactions, and thus underestimate the com- plexity of classes and fail to properly predict their quality attributes. To address this problem Arisholm et al. [3] define a family of dynamic coupling measures that account for polymorphism. They collect dynamic coupling measures through dynamic analysis and show that these measures are bet- ter indicators of complexity and better predic- tors of quality attributes than traditional cou- pling measures. This paper presents a new approach to the computation of dynamic coupling measures. Our approach uses static analysis, in partic- ular class analysis, and is designed to work on incomplete programs. We perform experi- ments on several Java components and present a precision evaluation which shows that inex- pensive class analysis such as RTA computes dynamic coupling measures with almost per- fect precision. Our results indicate that inex- pensive static analysis may be used as a more convenient, more practical and more precise al- ternative to dynamic analysis for the purposes of computation of dynamic coupling measures. Department of Computer Science, Rensselaer Polytechnic Institute, Troy, NY cs-06-07

Static Analysis for Dynamic Coupling Measures

Yin Liu

Ana Milanova

Coupling measures have important applica- tions in software development and mainte- nance. They are used to reason about the structural complexity of software and have been shown to predict quality attributes such as fault-proneness, ripple effects of changes and changeability. Traditional object-oriented cou- pling measures do not account for polymorphic interactions, and thus underestimate the com- plexity of classes and fail to properly predict their quality attributes. To address this problem Arisholm et al. [3] define a family of dynamic coupling measures that account for polymorphism. They collect dynamic coupling measures through dynamic analysis and show that these measures are bet- ter indicators of complexity and better predic- tors of quality attributes than traditional cou- pling measures. This paper presents a new approach to the computation of dynamic coupling measures. Our approach uses static analysis, in partic- ular class analysis, and is designed to work on incomplete programs. We perform experi- ments on several Java components and present a precision evaluation which shows that inex- pensive class analysis such as RTA computes dynamic coupling measures with almost per- fect precision. Our results indicate that inex- pensive static analysis may be used as a more convenient, more practical and more precise al- ternative to dynamic analysis for the purposes of computation of dynamic coupling measures.

Department of Computer Science, Rensselaer Polytechnic Institute, Troy, NY

cs-06-07