Your SlideShare is downloading. ×
0
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

ECOOP01 PhDOOS.ppt

48

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
48
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Design Patterns Round-trip A trip in the marvellous country of design pattern application and detection
  • 2. Us n Hervé Albin-Amiot – 3rd year PhD student – Partly funded by Soft-Maint S.A. (France) n Yann-Gaël Guéhéneuc – 2nd year PhD student – Partly funded by Object Technology International, Inc. (Canada) n PhDs hosted by the École des Mines de Nantes
  • 3. Overview on design patternsn Design patterns are useful for: – Designing – Implementating – Documentating – Re-engineeringn Design patterns are difficult to use: – Lack of formalism – And thus, lack of automation
  • 4. Our Goalsn We want: – To help designer – To help maintainern We do not want: – To replace the designer – To be Caliph in the Caliphs steadn We need to automate the uses of design patterns
  • 5. Goals of the automationn We want to assist developers: – In applying design patterns – In detecting design patternsn We want to provide round-trip using design patternsn We need a common design pattern description
  • 6. Common design patterndescription: A Meta-Model
  • 7. Abstract model Informal descriptions from [GoF] Translates into Instance of Pattern Instance of PInterface Instance of PClass Instance of PAssoc Instance of PDelegation name() Instance of PMethod
  • 8. PatternsBox Abstract model PtidejComposite pattern concrete model 1 Composite pattern concrete model n • • ‚ ‚ ‚ ‚ Composite pattern abstract model • •Composite pattern concrete model 1 Composite pattern concrete model n (source code) (source code)
  • 9. icA Bas xample : Application 1/4 En PatternsBox is a tool to instantiate design patterns from a repository of patterns
  • 10. icA Bas xample : Application 2/4 En From the pattern, we access the pattern description
  • 11. icA Bas xample : Application 3/4 En We adapt actors and roles to the current context
  • 12. icA Bas xample : Application 4/4 En The tool generates the code of the pattern for Java (or for PaLM, …) public interface MyComponent { public abstract void myOperation(); } public class MyComposite implements MyComponent { // Association: myChildren private java.util.Vector myChildren = new java.util.Vector(); public void add (MyComponent myComponent) { myChildren.addElement(myComponent); } public void remove (MyComponent myComponent) { myChildren.removeElement(myComponent); } // Method linked to: myChildren public void myOperation() { for (Enumeration enum= myChildren.elements(); enum.hasMoreElements (); ((MyComponent) enum.nextElement()).myOperation()); } } public class MyLeaf implements MyComponent { public void myOperation() { } }
  • 13. icA Bas xample : Detection 1/6 En Ptidej detects instances of the abstract model
  • 14. icA Bas xample : Detection 2/6 En It is a tool that identifies design patternsn It loads and displays an application architecture
  • 15. icA Bas xample : Detection 3/6 En Itgenerates a CSP from the architecturen The CSP has the architecture for model and the abstract model for constraints
  • 16. icA Bas xample : Detection 4/6 EThe PaLM explanation-based constraint solver
  • 17. icA Bas xample : Detection 5/6 En Thetool highlights the distorted and complete design patterns found in the architecture
  • 18. icA Bas xample : Detection 6/6 En The tool states the differences between the distorted solutions and the abstract model
  • 19. Future 1/2n To have two separate meta-models – One specific for design patterns – One specific for source coden To extend PatternsBox to apply design patterns to existing code using a source-to-source transformation enginen To use XML for the patterns repository and XSLT to generate Java examples
  • 20. Future 2/2n To take few months of holidaysn To manage dynamic informationn To define an operational semantics for association, aggregation, … linksn To improve the constraintsn To integrate our tools with IDEs

×