220 likes | 462 Views
Coherent Dependence Clusters. Syed Islam. Agenda. Coherent Clusters (Specialized Dependence Cluster). Visualization Tool for Dependence Clusters . Mapping Source Code Constructs to Clusters. Overlapping Clusters. Program Comprehension / Maintenance Fault Prediction.
E N D
Coherent Dependence Clusters Syed Islam
Agenda • Coherent Clusters (Specialized Dependence Cluster) • Visualization Tool for Dependence Clusters • Mapping Source Code Constructs to 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. • 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. • Two statementsthatmutually depend upon each other must be in each others slice. i j
Dependence Cluster .. • Remembering all the slices is too expensive. • Approximation techniques were used • Same SliceCluster • Same Slice-Size Cluster.
MSG -Monotone Slice-Size Graph • Calculate the Slice Sizes for each SDG vertex of a program. • Plot all slice sizes of the program in one graph in monotonically increasing order of the sizes. X axis: percentage of slices represented Y axis: normalised slice size
Coherent Clusters • Same-Slice Dependence cluster have internal and external requirements. • Statements of Clusters constructed from Backward Slices areall 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.
Dependence Cluster • Forward-Slice Cluster • Backward-Slice Cluster • Coherent Cluster What forms a cluster? x 1 2 5 3 4 y
SCG – Slice/Cluster-Size Graph B-MSG F-MSG
SCG – Slice/Cluster-Size Graph B-MCG F-MCG
SCG – Slice/Cluster-Size Graph Coherent Clusters
Function Mapping To Cluster • Tool Maps: source lines and files to clusters. • functions represent particular computation • mapping 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. • x and y, where nodesxand yare nodes of a pdg • | {x,y: S(x) = S(y) }| • | { x,y : x S(y) y S(x) }| S() – Backward Slice • The algorithm runs in T(n) = O(n3) hence 30 days • BC – The results is 60%.
Coherent Cluster Dependence Graph 1 2 5 3 4 17 What does this mean?
Coherent Cluster Dependence Graph .. 1 2 5 3 4 Does this mean we are looking at a dependence cluster (or .. MDS)?
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
Ongoing Work • Complete implementation of the tool • Mapping Source Code Constructs to Clusters • Combining Cluster – Larger Clusters • Longitudinalstudy • Faults • Metrics