Understanding your code assets with Moose

1,012 views

Published on

Understanding your code assets with Moose. Stéphane Ducasse, Tudor Gîrba, Adrian Kuhn, Michele Lanza. ESUG 2005, Bruessels

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

  • Be the first to like this

No Downloads
Views
Total views
1,012
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Understanding your code assets with Moose

  1. 1. 8/18/05 © Tudor Gîrba Understanding your code assets with Moose Stéphane Ducasse, Tudor Gîrba, Adrian Kuhn Software Composition Group University of Bern, Switzerland Michele Lanza Faculty of Informatics University of Lugano, Switzerland …
  2. 2. 8/18/05 © Tudor Gîrba 2 Context: Software development is more than forward engineering Requirements Analysis Design ImplementationTime
  3. 3. 8/18/05 © Tudor Gîrba 3 Reverse engineering is creating high level views of the system … For example: It provides an overview, by striping away details
  4. 4. 8/18/05 © Tudor Gîrba 4 Reverse engineering is creating high level views of the system … Large systems Not an algorithm Multiple techniques: UML diagrams Metrics Visualization …
  5. 5. 8/18/05 © Tudor Gîrba 5 Moose is a reengineering tool which integrates multiple techniques Visualization Evolution Analysis Moose … Queries and Navigation Number of classes = 382 Number of methods = 4268 … Semantic Analysis Metrics word1 word2
  6. 6. 8/18/05 © Tudor Gîrba 6 … = 7Average number of methods per class = 4268Number of methods = 382Number of classes Metrics compress the system into numbers and enable comparisons Metrics can answer questions: How big is the system? How is the complexity spread over the system? …
  7. 7. 8/18/05 © Tudor Gîrba 7 Visualization compresses the system into pictures Visualization can provide: Quick overview Spatial orientation …
  8. 8. 8/18/05 © Tudor Gîrba 8 Visualization: Polymetric views can display up to 5 metrics on a 2D figure Color Metric Position Metrics Width Metric Height Metric System Complexity View Class Blueprint
  9. 9. 8/18/05 © Tudor Gîrba 9 Queries reduce the analysis space Queries reveal: Similar entities Entities which are out of ordinary Queries make use of properties (e.g., metrics)
  10. 10. 8/18/05 © Tudor Gîrba 10 Moose at work: analyzing the structure of software systems Visualization Queries and Navigation Number of classes = 382 Number of methods = 4268 … Metrics
  11. 11. 8/18/05 © Tudor Gîrba 11 Semantic analysis attaches semantics to structure word1 word3 word2 … Applicability: Text Search Semantic Clustering …
  12. 12. 8/18/05 © Tudor Gîrba 12 Moose at work: analyzing the semantics of software systems Semantic Analysis word1 word2
  13. 13. 8/18/05 © Tudor Gîrba 13 Time contains useful information for reverse engineering Time Requirements Analysis Design Implementation
  14. 14. 8/18/05 © Tudor Gîrba 14 The evolution analysis compresses time through metrics, visualization … History can answer questions: Which parts are change-prone? How did the system get in the current shape? … Problem: Large amounts of data
  15. 15. 8/18/05 © Tudor Gîrba 15 Our approach: History as a first class entity encapsulates the evolution Vers.1 Vers.2 Vers.3 Vers.4 Vers.5 History A B C D
  16. 16. 8/18/05 © Tudor Gîrba 16 History can be measured: How much was a class changed in its history? 4 2 3 31 3 + 2 + 1 + 0 Evolution of Number of Methods (E_NOM) Stability of Number of Methods (S_NOM) 0 + 0 + 0 + 1 4 = = = 0.25 = 6
  17. 17. 8/18/05 © Tudor Gîrba 17 Moose at work: analyzing the history of software systems Evolution Analysis
  18. 18. 8/18/05 © Tudor Gîrba 18 … Actually, Moose is an environment for reengineering Van VW Smalltalk Java C/C++ Parser Cobol Tools integration mechanisms Metrics Language independent model repository CodeCrawler Visualization Evolution analysis … Semantic analysis Concept analysis Dynamic analysis Clustering Duplication detection …
  19. 19. 8/18/05 © Tudor Gîrba 19 Class Namespace Method Attribute InvocationAccess Inheritance Package… 1 * * * * 1 * 2 *21* 1 * 1* Moose is language independent through the FAMIX meta-model Java Parser: jFamix Eclipse Plugin (http://jfamix.sourceforge.net/) C++ Parser: Columbus (http://www.frontendart.com/products.html#Columbus) Java/C++ Parser: iPlasma (Loose Research Group)
  20. 20. 8/18/05 © Tudor Gîrba 20 Moose has been validated on real life systems written in different languages ………… ~1800260’000SmalltalkSqueak ~4900300’000JavaJBoss ~700135’000SmalltalkJun ~110001’000’000C/C++X ~400120’000C++/JavaY ~23001’200’000C++Z ClassesLines of CodeLanguageSystem
  21. 21. 8/18/05 © Tudor Gîrba 21 Summary: Moose is an extensible and collaborative reengineering environment is research driven: metrics, visualization, evolution analysis … is industrially validated is free under BSD license Accessibility: www.iam.unibe.ch/~scg/Research/Moose/ VisualWorks distribution CD Questions?
  22. 22. 8/18/05 © Tudor Gîrba 22 Ownership Map reveals how developers drive software evolution

×