180 likes | 299 Vues
This study by David Binkley and collaborators from Loyola College and King’s College London presents a framework for Key Statement Analysis (KSA) to evaluate the impact and cohesion of key statements in software functions. The research utilizes principal variables to quantify these metrics, focusing on their outward influence and inward connectedness. The empirical study highlights that 25% of function size contributes to managing 70% of impact, revealing that achieving higher cohesion can lead to reduced dependence clusters. The findings carry implications for software engineering practices, enhancing the understanding of effective coding strategies.
E N D
Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman,Zheng Li, Kiarash Mahdavi CREST, King’s College London, UK
Overview • KSA • Two metrics • Impact • Cohesion • Research Questions • Empirical study • Results
Key Statement Analysis (KSA) • Identify key statements • The statements that capture most impact with highest cohesion
Why KSA Many analyses produce far too much e.g. slicing, chopping
Principal Variables (PV) Bieman and Ott’s Principal Variables • PVG – a global variable assigned in F • PVO – a variable used in an output statement in F • PVG UPVO
r h void cylinder(int r, h) { D=2*r; perimeter=PI*D; undersurface=PI*r*r; sidesurface=perimeter*h; area=2*undersurface+sidesurface; volume=undersurface*h; printf(“\nThe Area is %d\n", ); printf(“\nThe Volume is %d\n", ); } area volume
Metrics for KSA • Impact: outward influence of the key statements • Cohesion: inward connectedness of the key statements
The worst case for KSA If all statements in a module are in a dependence cluster…
Research Questions • Size • Impact • Cohesion • Large dependence cluster
Tools • CodeSurfer • SPSS
Results • Size • 25% of the function size • Impact • 70% of impact of the function. • Cohesion • More than 80% of cohesion • Large Dependence Cluster • a clear and largely negative impact