Download presentation
Presentation is loading. Please wait.
Published byLeona Woods Modified over 9 years ago
1
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Evaluating Key Statements Analysis David Binkley - Loyola College, USA Nicolas Gold, Mark Harman, Zheng Li, Kiarash Mahdavi CREST, King’s College London, UK
2
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Overview KSA Two metrics –Impact –Cohesion Research Questions Empirical study Results
3
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Key Statement Analysis (KSA) Identify key statements The statements that capture most impact with highest cohesion
4
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Why KSA Many analyses produce far too much e.g. slicing, chopping
5
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Framework Modules Functions Classes Concept bindings Principal Variables Key Statements
6
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Principal Variables (PV) Bieman and Ott’s Principal Variables PV G – a global variable assigned in F PV O – a variable used in an output statement in F PV G U PV O
7
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li 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", ); } r h area volume
8
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Metrics for KSA Impact: outward influence of the key statements Cohesion: inward connectedness of the key statements
9
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Cohesion
10
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Dependence Cluster
11
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li The worst case for KSA If all statements in a module are in a dependence cluster…
12
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Research Questions Size Impact Cohesion Large dependence cluster
13
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Analysis Subjects
14
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Tools CodeSurfer SPSS
15
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Impact
16
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li Cohesion
17
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li 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
18
SCAM’08 -- Evaluating Key Statements AnalysisZheng Li less is more
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.