acdc: an algorithm for comprehension-driven clustering vassilios tzerpos r.c. holt

17
ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Upload: robyn-bridges

Post on 03-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

ACDC: An Algorithm forComprehension-Driven Clustering

Vassilios Tzerpos

R.C. Holt

Page 2: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Highest cohesion clustering

SS1

SS2

SS4

SS11

SS12

SS9

SS10

SS8

SS5

SS6

SS7SS3

Page 3: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Contents of SS11

Page 4: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Essential comprehension features

Effective cluster namingBounded cluster cardinalityFamiliarity

Comprehension as pattern recognition Certain subsystem patterns emerge often in

manual decompositions of software systems

Page 5: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Source file pattern

Proc3

Proc2

Proc1 Proc4

Proc6

Proc5

Var1

Var2

Var3

File1 File2

Page 6: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Directory structure pattern

File3

File2

File1 File4

File6

File5

File7

File8

File9

Dir1 Dir2

Page 7: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Body-header pattern

alice.c

bob.h

bob.c

alice.h

Page 8: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Leaf collection pattern

sin.c tan.ccos.c

Page 9: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Support library pattern

busy.c weary.ctired.c

Page 10: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Central dispatcher pattern

dispatcher.c

Page 11: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Subgraph dominator pattern

dominator.c

a.c

z.cg.cf.ce.cd.c

c.cb.c

Page 12: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

The ACDC algorithm

Two stages: Using a pattern-driven approach, a “skeleton”

of the final decomposition is created. Subsystems are named appropriately.

The decomposition is completed by applying an extended version of the Orphan Adoption algorithm

Page 13: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Skeleton construction

Source file clustersBody-header conglomerationLeaf collection and support library

identificationOrdered and limited subgraph dominationCreation of “support.ss”

Page 14: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Orphan Adoption

Incremental clustering techniqueOrphan: a newly introduced resource to a

software systemOrphans are adopted by the subsystem that

interacts mostly with themAssuming that a substantial skeleton has

been constructed in the first stage, the same technique can be applied here

Page 15: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

ACDC properties

Subsystems have familiar or intuitive namesThe cardinality of the subsystems is

boundedThe final decomposition is nested and

unbalancedLimited use of the directory patternMagic numbers not important

Page 16: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Algorithm validation

We experimented with two different software systems, TOBEY and Linux.

We measured the following: Performance Stability Skeleton size Quality

54 sec 84 sec

81.3% 69.4%

64.3% 51.1%

64.2% 55.7%

Page 17: ACDC: An Algorithm for Comprehension-Driven Clustering Vassilios Tzerpos R.C. Holt

Conclusions

Clustering approaches should focus on comprehension

Pattern-driven approach appears to perform satisfactorily

Impact of ACDC’s features on comprehension remains to be determined