COHERENT DEPENDENCE CLUSTERSSyed Islam1
AGENDA
2
Coherent Clusters (Specialized Dependence Cluster)
Mapping Source Code Constructs to Clusters
Visualization Tool for Dependence Clusters
Overlapping Clusters
Program Comprehension / Maintenance Fault Prediction
DEPENDENCE CLUSTER
A dependence cluster is a maximal set of program statements where each statement depends on all other.
3
Minimal Slice
DEPENDENCE CLUSTER (SLICE-BASED)
A Slice-Based Dependence Clusters is a maximal set of program statements all of which are in each others slice.
4
i j
Two statements that mutually depend upon each other must be in each others slice.
DEPENDENCE CLUSTER ..
5
Remembering all the slices is too expensive.
Approximation techniques were used
Same Slice Cluster
Same Slice-Size Cluster.
MSG -MONOTONE SLICE-SIZE GRAPH
Calculate the Slice Sizes for each SDG vertex of a program.
6
Plot all slice sizes of the program in one graph in monotonically increasing order of the sizes.
X axis: percentage of slices representedY axis: normalised slice size
COHERENT CLUSTERS
7
Same-Slice Dependence cluster have internal and external requirements.
Statements of Clusters constructed from Backward Slices are all influenced by the same set of statements. (Backward-Slice Cluster)
Statements of Clusters constructed from Forward Slices all influence the same set of statements. (Forward-Slice Cluster).
A Coherent Cluster is a set of statements where each statement has the same backward slice and the same forward slice.
WHAT FORMS A CLUSTER?
8
5
43
1
2
x
y
Dependence ClusterForward-Slice ClusterBackward-Slice ClusterCoherent Cluster
9
SCG – SLICE/CLUSTER-SIZE GRAPH
10
SCG – SLICE/CLUSTER-SIZE GRAPH
B-MSG
F-MSG
11
B-MCG
F-MCG
SCG – SLICE/CLUSTER-SIZE GRAPH
12
SCG – SLICE/CLUSTER-SIZE GRAPHCoherent Clusters
13
RESULTS COHERENT CLUSTERS
14
15
FUNCTION MAPPING TO CLUSTER
Tool Maps: source lines and files to clusters.
functions represent particular computationmapping functions to clusters.
Initial Data:
Multiple functions form a cluster.
Multiple clusters within the same function.
APPROXIMATION CONSTRAINTS
Calculate percentage of pair of nodes whose slices are the same; to that of where the nodes in the pair are in each others slice.
16
x and y, where nodes x and y are nodes of a pdg
| { x,y : S(x) = S(y) }|| { x,y : x S(y) y S(x) }|
BC – The results is 60%.
S() – Backward Slice
The algorithm runs in T(n) = O(n3) hence 30 days
17
COHERENT CLUSTER DEPENDENCE GRAPH
17
5
43
1
2
What does this mean?
COHERENT CLUSTER DEPENDENCE GRAPH ..
18
5
43
1
2
Does this mean we are looking at a dependence cluster (or .. MDS)?
19
70.43%
20
DAGSTUHL SEMINAR BEYOND PROGRAM SLICING
Hypothesis 1: short program slices have fewer faults
Hypothesis 2: code common to many program slices has fewer faults
Hypothesis 3: cliff faces in dependence clusters indicate faults
21
ONGOING WORK
22
Complete implementation of the tool
Mapping Source Code Constructs to Clusters
Combining Cluster – Larger Clusters
Longitudinal study Faults Metrics