martin p. robillard, mcgill university, canada acm transactions on software engineering and...

19
Topology Analysis of Software Dependencies MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented by Celal Ziftci, University of California San Diego CSE-294@UCSD-Spring’10 May 21 2010

Upload: william-rogers

Post on 13-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Topology Analysis of Software Dependencies

MARTIN P. ROBILLARD, McGill University, CanadaACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008

Presented by Celal Ziftci, University of California San DiegoCSE-294@UCSD-Spring’10

May 21 2010

Page 2: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Part of this presentation explains the journal paper as it stands, however I have added model-driven-development as a motivation and suggestions to make use of the paper’s approach in a model-driven-development context.

Disclaimer

Page 3: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Motivation◦ w.r.t. MDD◦ Example

Approach◦ Heuristics◦ Definitions◦ Sample run on our example◦ Case-study results

Why do we care?

Contents

Page 4: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Hopefully, a system has proper models that represent it in a true sense for round-trip engineering◦ We can associate models to code◦ We can associate code to models

But reality is not always so in many real-life projects…◦ Many legacy systems have code, but no models

If MDD was used up-start, this would not happen, but here we are now…

So, what do we do, if we need to make changes to/understand the system◦ Fixing a bug◦ Adding new functionality◦ New programmer in the team

Motivation: w.r.t. MDD

Page 5: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Big systems have so many lines of code◦ Software running in a car

10 million lines of code 10 ECUs communicating

with each other For our use-case, let us

pick a simplified car◦ Our focus: Understanding

acceleration & braking

Motivation: Example

Page 6: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Motivation: Example

Page 7: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Motivation: Example

Page 8: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Motivation: Example

Page 9: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Note that, in our case, we start from source code… We would like to explore parts of code that lead to

the part we are interested in step-by-step: in waves

Can’t we do this in tools like Eclipse IDE already?◦ Yes and No…◦ Yes:

Eclipse can show all code paths leading to a method/field◦ No:

No ranking in the relevancy of results No extra custom dependencies (for eg. who writes to a field?)

Motivation: Example

Page 10: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Motivation: Example

Adapted from [1]

Page 11: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Specificity

Approach: Two heuristics for degree of interest

Reinforcement

6 is more specific2 is more specific 6 is reinforced

2 is reinforced

[1]

[1]

Page 12: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Approach: Definitions

Page 13: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Consider a specific relation: called-by

Approach: Sample run

called-by

called-byT = called

Page 14: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

A: Sforward={c,d,e}◦ c: Sbackward={A}

◦ d: Sbackward={A}

◦ e: Sbackward={A, B, f}

B: Sforward={e}◦ e: Sbackward={A, B, f}

degreec = 0.76 * 0.75 = 0.57 degreed = 0.76 * 0.75 = 0.57 degreee = max(0.69 * 0.75, 0.9 * 0.25) = 0.52

Approach: Sample run (called-by)

[1]

Page 15: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

We did the sample run for called-by dependency.

Same calculations done for other dependencies as well (for eg accessed-by for fields)

All the suggestion sets are combined using fuzzy sets (similar to what we did in our example)

Approach: Sample run

Page 16: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

And more similar results…

Approach: Results

[1]

[1]

Page 17: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

This tool (and other similar ones) makes it easier to follow the approach effective developers were observed to follow [2].◦ As the developer uses this tool in waves, the tool can record

which elements were chosen to be worthy of interest and further investigation.

◦ Then, the tool can generate models out of the relationships between those elements automatically

◦ The developer already investigated and marked what is relevant, and the tool saves him from the burden of creating a model that explains what he did already.

Using this approach, we can do round-trip engineering.◦ Even if we go the forward direction (models to code), we can

use this approach to check if what we believe to exist in code is the reality

So… Why do we care?…

Page 18: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

Thank you! Now any further questions?

Questions

Page 19: MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented

[1] Robillard, M. P. 2008. Topology analysis of software dependencies. ACM Trans. Softw. Eng. Methodol. 17, 4 (Aug. 2008), 1-36. DOI=http://doi.acm.org/10.1145/13487689.13487691

[2] Robillard,M. P.,Coelho,W., Andmurphy,G. C. 2004. How effective developers investigate sourcecode: An exploratory study. IEEE Trans. Softw. Engin. 30, 12, 889–903.

References