1 / 20

Efficient Identification of Design Patterns with Bit-vector Algorithm

Efficient Identification of Design Patterns with Bit-vector Algorithm. Design recovery to maintain. Contents. Introduction Design recovery Bio-informatics Bit-vector algorithm Sample Algorithm Procedure Design Pattern - Composite Simple Program Structure Development Procedure 4 Step

Download Presentation

Efficient Identification of Design Patterns with Bit-vector Algorithm

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. Efficient Identification of DesignPatterns with Bit-vector Algorithm Design recovery to maintain

  2. Contents • Introduction • Design recovery • Bio-informatics Bit-vector algorithm • Sample Algorithm Procedure • Design Pattern - Composite • Simple Program Structure • Development Procedure • 4 Step • Results • Conclusion

  3. Introduction - Design Recovery Efficiently Maintain

  4. Introduction - Bit Vector • The structure of DNA and RNA are very similar. They are both ordered sequences of 4 types of substances: ACGT for DNA, and ACGU for RNA. • ex) AAACGTTTCCGGAATGG • find TCC • DNA is string(ACGT). • For Searching "Matching DNA", use Bit Vector Algorithm. • Program source is string too. • We can use Bit Vector

  5. Sample Algorithm Procedure - Composite 1. Pattern 2. Eulerian model 3. String

  6. Sample Algorithm Procedure - Simple Program 1. Source 2. Eulerian model 3. String

  7. Sample Algorithm Procedure - Searching 1 2 3 Component in Leaf dm Component in Composite co Component A in B in D dm B in E co B in C dm G cr C dm G cr D dm G cr E dm G as F ag A 3 [Find Composite Pattern] B = Component D = Leaf E = Composite 1 2

  8. Sample Algorithm Procedure - Bit Vector If B == Component, Where is B A in B in D dm B in E co B in C dm G cr C dm G cr D dm G cr E dm G as F ag A 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 >>B (double shift) 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 We need "in" relation A in B in D dm B in E co B in C dm G cr C dm G cr D dm G cr E dm G as F ag A 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 >in 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 If E = Composite, Where is E 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0

  9. Sample Algorithm Procedure - Bit Vector 2 (>>B) and (>in) and (E) = not null = (B in E) 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 and and 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 and 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 = 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 It is finish next 1 2 3 Component in Leaf dm Component in Composite co Component

  10. Sample Algorithm Procedure - Bit Vector 3 It is finish next 1 2 3 Component in Leaf dm Component in Composite co Component 1 and 2 and 3 = not null A in B in D dm B in E co B in C dm G cr C dm G cr D dm G cr E dm G as F ag A

  11. Development Procedure 1/4 • Model( Design patterns, Program ) • PADL meta-model • To describe design motifs and programs. • Defines all the constituents. • To describe design motifs and programs • behaviour, relationships, message sends. • Parsers to build models • AOL, C++, Java • Includes a design motif repository • Containing several well-known design patterns • such as Abstract Factory, Composite, Facade.

  12. Development Procedure 2/4 • Eulerian Graph • Equal in-degree and out-degree • Need DM(Dummy) Edge • Park's implementation of the transportation simplex

  13. Development Procedure 3/4 • String Representations • Thimbleby's efficient implementation of an algorithm to solve the Chinese Postman problem

  14. Development Procedure 4/4 • Iterative bit-vector algorithm • In Java using the Eclipse platform. • We use a sparse vector(bit string) • majority of the bits in the vectors are 0 • Hash map and only the 1-valued bits are stored.

  15. Results • Two Design Patterns • Abstract Factory • Composite • Three Programs • JHotDraw v5.1 • Juzzle v0.5 • QuickUML 2001 AMD Athlon 64bits at 2GHz.

  16. Results 2 • Compare with other Approach • CP : explanation-based Constraint Programming • M : Matric-enhanced Bit Vector - Optimize

  17. Result 3 • Optimize ?? {Component = B, Composite = E, Leaf = {C, D}} or {Component = B, Composite = E, Leaf = C} ∧ {Component = B, Composite = E, Leaf = D}. Leaf -> Leaves

  18. Results 4 the use of metrics is interesting because it reduces the noise and could be combined with our bit-vector algorithm to increase precision and performance even more.

  19. Conclusion • We presented an adaptation of bio-informatics bitvector algorithms to the software maintenance problem of design pattern identification. • We implemented our approach and showed its efficiency on three small-to-medium size programs and the quality of its results, including its approximation capabilities. • Some design patterns also specify what must not be found. For example, the Adaptee role in the Adapter design motif must not know the Adapter role. • As future work • string representation -> Build automatically. • string representation -> Search their emplacements in the program.

  20. 4배수 만들기 페이지

More Related