1 / 41

Design Recovery 1

Design Recovery 1. Informatics 122 Alex Baker. What is Design Recovery?. Sort of like reverse engineering. What is Design Recovery?. Design recovery recreates design abstractions from Code Existing design documentation (if available)

ametts
Download Presentation

Design Recovery 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Design Recovery 1 Informatics 122 Alex Baker

  2. What is Design Recovery? • Sort of like reverse engineering

  3. What is Design Recovery? • Design recovery recreates design abstractions from • Code • Existing design documentation (if available) • Personal experience / general knowledge about problem and application domains • Talking to people (Biggerstaff, 1989)

  4. What is Design Recovery? • Recovered abstractions need: • Formal specifications • Module breakdowns • Data abstractions • Dataflows • Informal knowledge • All information required to understand • What • How • Why (Biggerstaff, 1989)

  5. Also like a double-waterfall… • General model for recovery (Byrne, 1992) Alteration Reverse Engineering Abstraction Con- ceptual re-think Con- ceptual Forward Engineering Refinement re-specify Requirements Requirements re-design Design Design re-build Implementation Implementation Existing System Target System

  6. Why do we need to know this? • Working with others’ code… • Debugging • Maintenance • Reuse • Working with your own code

  7. Motivation: No design • Lost design • Build-and-fixed • Agile methodologies • Incomprehensible design

  8. Motivation: Design Drift

  9. Motivation: Design Drift • Design not followed

  10. Motivation: Design Drift • Design not followed

  11. Motivation: Design Drift • Design deviations

  12. Motivation: Design Drift • Design deviations ?

  13. Motivation: Design Drift • Design deviations

  14. Motivation: Design Drift • Design deviations ??? ???

  15. Motivation: Design Drift • Design deviations ??? ???

  16. Motivation: Design Drift • Design deviations ??? ???

  17. Motivation: Design Drift • Design deviations

  18. Motivation: Design Drift

  19. Motivation: Design Drift ???

  20. Motivation: Design Drift ???

  21. Domain of Use Knowledge Design Recovery in Diamond Dom Materials Rep (Code) Ideas Activity concern manipulates informs captures enhances Goal

  22. Domain of Use Knowledge Design Recovery in Diamond • Someone made a design… Dom Materials Representation Ideas Activity concern manipulates informs captures enhances Goal

  23. Domain of Use Knowledge Design Recovery in Diamond • Someone used that to create code (fairly rotely) Dom Materials Rep (Design) Rep (Code) Ideas Activity concern manipulates informs captures enhances Goal

  24. Domain of Use Knowledge Design Recovery in Diamond • You get ideas from the code • But do the captures relationships hold? Dom Materials Rep (Code) Ideas Activity concern manipulates informs captures enhances Goal

  25. Domain of Use Knowledge Design Recovery in Diamond • So when you modify the code, who knows? Dom Materials Rep (Code) Ideas Activity concern manipulates informs captures enhances Goal

  26. Could even be your own code • You’ve often recovering, in some sense ???

  27. Also, remember • Design recovery recreates design abstractions from • Code • Existing design documentation (if available) • Personal experience • General knowledge about problem and application domains

  28. Domain of Use Knowledge Design Recovery in Diamond • Every part is involved Dom Materials Representation Ideas Activity concern manipulates informs captures enhances Goal

  29. Isn’t this Reverse Engineering? • Not just recreating the UML diagram… • Program flows • Rationale • Metaphor

  30. Also like a double-waterfall… • General model for recovery (Byrne, 1992) Alteration Reverse Engineering Abstraction Con- ceptual re-think Con- ceptual Forward Engineering Refinement re-specify Requirements Requirements re-design Design Design re-build Implementation Implementation Existing System Target System

  31. Finding the structure(not the same as the design) • Entities • Classes • Methods • Variables • Relationships • Inheritance • Method calls • References

  32. Approaches • Reverse engineering tools • E.g. Omondo • Reading documentation • Code reading • Reading class names • Talking to people

  33. But where’s the design? What principles were applied? What were their priorities? What patterns emerged? What actual patterns were used? • This will save you a lot of trouble

  34. An example: Jetris

  35. Jetris Design Recovery • Run the game • Reading names • What is HTMLLink? • What is Figures.java? • What’s with those arrays? • What about the big classes? • Omondo

  36. What will you actually create? • It depends: • How difficult? • Who else? • The future…

  37. The other side of the coin… • How easy is your program to understand? • How is your: • Documentation • Naming • Code

  38. Assignment 4 • Recover the design of Cake • Layered design environment, uses Archstudio’s BnA Framework • You may use any tools you like • Each group: • A Complete UML (-ish) Diagram • Each group member: • A 4-6 page double-spaced paper explaining your understanding of the program’s design, including patterns, principles etc. • Must provide good high and low level explanation • Due Sunday at Midnight • Email to abaker@ics.uci.edu and andre@ics.uci.edu • Paper copies in class on Monday

  39. Possible subjects • What types of classes appear • What do they do? What do they mean? • What do other specific classes do? • How to they all relate? • How is layering implemented? • What was the effect of using BnA in the design? • What principles might have guided the design?

  40. Some tips • Won’t have room for rote completeness, will need to be elegant • Use representations of classes to organize • Look for implements relationships

  41. Useful links • Archstudio Source • http://www.isr.uci.edu/projects/archstudio/setup-fromsource.html • Descriptions for BnA Package Classes • http://www.isr.uci.edu/projects/archstudio/javadoc/archstudio/edu/uci/ics/bna/package-summary.html • BNA Hierarchy • http://www.isr.uci.edu/projects/archstudio/javadoc/archstudio/edu/uci/ics/bna/package-tree.html

More Related