TOWARDS PROBABILISTIC
ASSESSMENT OF MODULARITY
Kevin Hoffman and Patrick Eugster, C.S. Department, Purdue University
ACoM ...
Questions of Interest
   Q1) Which program elements are the most
    depended upon?
   Q2) Which program elements are th...
Strategy for Answering
   Model software using Design Structure Matrices (DSMs)
   Assign weights to each cell as releva...
DSM Generation
Weighted DSM Generation
   Weights based on knowledge of other subsystems
   Weights based on actual use of other subsys...
Form the Assessment Graph

                  3            4   8
                          13
         2                   ...
Normalize Edge Weights

                     3             4     1.0
                             1.0
          2         ...
All Nodes Have > 0 out-Edges

                               3             4     1.0
                                     ...
Metric Calculation
   Weighted edge matrix of Assessment Graph now
    forms a time-homogenous Markov chain
   Stationar...
Metric Calculation Example
Q1) Which program elements are the
most depended upon?
   Calculate DSM weights based on coupling measures
   Form Asses...
Q2) Which program elements are the
most likely to change?
   Calculate DSM weights based on coupling measures
   Form As...
Q3) Which program elements are the most likely to be
affected by rippled effects given a set of changes?

   Calculate th...
Q4) Which program elements were most
influential during some execution of a test case?

   Construct weighted DSM from el...
Normalization Choices


 By Row (Local)   By Table (Global)
PetStore – Exceptions w/ AspectJ
PetStore – Exceptions w/ AJ/EJPs
Future Directions
    Refine metric definitions
      Appropriate   normalization strategies
    Other sources for weig...
Towards Probabilistic Assessment of Modularity
Upcoming SlideShare
Loading in …5
×

Towards Probabilistic Assessment of Modularity

685 views

Published on

We propose new modularity metrics based on probabilistic computations over weighted design structure matrices, also known as dependency structure matrices.
We define how these metrics are calculated, discuss some practical applications, and conclude with future work.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
685
On SlideShare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Towards Probabilistic Assessment of Modularity

  1. 1. TOWARDS PROBABILISTIC ASSESSMENT OF MODULARITY Kevin Hoffman and Patrick Eugster, C.S. Department, Purdue University ACoM 2008 @ OOPSLA
  2. 2. Questions of Interest  Q1) Which program elements are the most depended upon?  Q2) Which program elements are the most likely to change? (i.e. the most fragile?)  Q3) Which program elements are the most likely to be affected by rippled effects given a set of changes?  Q4) Which program elements were most influential during some execution of a test case?
  3. 3. Strategy for Answering  Model software using Design Structure Matrices (DSMs)  Assign weights to each cell as relevant to the question  Formulate an Assessment Graph from the DSM  Normalize data to produce a time-homogenous Markov chain  Compute the stationary distribution of the Markov chain (à-la PageRank, EigenTrust)  Overlay visualization onto DSM
  4. 4. DSM Generation
  5. 5. Weighted DSM Generation  Weights based on knowledge of other subsystems  Weights based on actual use of other subsystems  Weight assignment strategy governed by question
  6. 6. Form the Assessment Graph 3 4 8 13 2 5 17 1 1 6 7 2 3 10 7 5 9 8
  7. 7. Normalize Edge Weights 3 4 1.0 1.0 2 5 1.0 1.0 1 6 0.778 0.222 1.0 10 7 1.0 9 8
  8. 8. All Nodes Have > 0 out-Edges 3 4 1.0 1.0 2 5 1.0 0.1 0.1 0.1 0.1 1.0 1 0.1 6 0.1 0.1 0.778 0.222 0.1 0.1 1.0 10 7 1.0 9 8
  9. 9. Metric Calculation  Weighted edge matrix of Assessment Graph now forms a time-homogenous Markov chain  Stationary distribution of the Markov chain provides the metric results  Calculated by finding the left eigenvector of the transition matrix of the Markov chain  Computed using Power Iteration algorithm  “Damping factor” to ensure convergence (guarantees aperiodicity of Markov chain)
  10. 10. Metric Calculation Example
  11. 11. Q1) Which program elements are the most depended upon?  Calculate DSM weights based on coupling measures  Form Assessment Graph from DSM and normalize  Algorithm output defined as the… Dependency Propagation Ranking
  12. 12. Q2) Which program elements are the most likely to change?  Calculate DSM weights based on coupling measures  Form Assessment Graph from DSM and normalize  REVERSE DIRECTION of edges in graph  Algorithm output defined as the… Impact Propagation Ranking Dependency Propagation Ranking Impact Propagation Ranking
  13. 13. Q3) Which program elements are the most likely to be affected by rippled effects given a set of changes?  Calculate the Impact Propagation Ranking for two versions of a program  Define the absolute value of the difference between these vectors to be the… Impact Shift Ranking
  14. 14. Q4) Which program elements were most influential during some execution of a test case?  Construct weighted DSM from elements in execution traces  Which parts of execution traces  How to abstract to the appropriate level of detail?  What should be used to formulate the weights?  Form Assessment Graph from DSM and normalize  Use output of algorithm to understand Q4
  15. 15. Normalization Choices By Row (Local) By Table (Global)
  16. 16. PetStore – Exceptions w/ AspectJ
  17. 17. PetStore – Exceptions w/ AJ/EJPs
  18. 18. Future Directions  Refine metric definitions  Appropriate normalization strategies  Other sources for weights  Logical coupling  Data flow analysis  Execution trace data  Apply to several large bodies of software  Integrated tool chain for fast visualization Send comments and questions to kjhoffma@cs.purdue.edu

×