Upload
cinderella-rufus
View
28
Download
1
Embed Size (px)
DESCRIPTION
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 - PowerPoint PPT Presentation
Citation preview
March - 2007Applied Software Engineering Lab, UOU 1/20
Presenter: Shin joon choul
Applied Software Engineering Lab
Efficient Identification of DesignPatterns with Bit-vector Algorithm
Design recovery to maintain
April - 2007Applied Software Engineering Lab, UOU 2/20
Contents Introduction
Design recovery Bio-informatics Bit-vector algorithm
Sample Algorithm Procedure Design Pattern - Composite Simple Program Structure
Development Procedure 4 Step
Results Conclusion
April - 2007Applied Software Engineering Lab, UOU 3/20
Introduction - Design Recovery
•Efficiently Maintain
April - 2007Applied Software Engineering Lab, UOU 4/20
Introduction - Bit Vector The structure of DNA and RNA are very similar. They ar
e 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
April - 2007Applied Software Engineering Lab, UOU 5/20
Sample Algorithm Procedure - Composite
1. Pattern 2. Eulerian model 3. String
April - 2007Applied Software Engineering Lab, UOU 6/20
Sample Algorithm Procedure - Simple Program
1. Source 2. Eulerian model 3. String
April - 2007Applied Software Engineering Lab, UOU 7/20
Sample Algorithm Procedure - Searching
•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
•[Find Composite Pattern]•B = Component
•D = Leaf•E = Composite
•1 •2 •3
•1 •2
•3
April - 2007Applied Software Engineering Lab, UOU 8/20
Sample Algorithm Procedure - Bit VectorIf B == Component, Where is B
•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
•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
•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
•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
April - 2007Applied Software Engineering Lab, UOU 9/20
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
•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
•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
andand
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 0 0 0 0 0 0 0
finish
•Component in Leaf dm Component in Composite co Component
•1 •2 •3It is
next
April - 2007Applied Software Engineering Lab, UOU 10/20
Sample Algorithm Procedure - Bit Vector 3
finish
•Component in Leaf dm Component in Composite co Component
•1 •2 •3It is
next
•1 •2 •3and and = 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
April - 2007Applied Software Engineering Lab, UOU 11/20
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.
April - 2007Applied Software Engineering Lab, UOU 12/20
Development Procedure 2/4 Eulerian Graph
Equal in-degree and out-degree Need DM(Dummy) Edge
• Park's implementation of the transportation simplex
April - 2007Applied Software Engineering Lab, UOU 13/20
Development Procedure 3/4 String Representations
Thimbleby's efficient implementation of an algorithm to solve the Chinese Postman problem
April - 2007Applied Software Engineering Lab, UOU 14/20
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.
April - 2007Applied Software Engineering Lab, UOU 15/20
Results Two Design Patterns
Abstract Factory Composite
Three Programs JHotDraw v5.1 Juzzle v0.5 QuickUML 2001
AMD Athlon 64bits at 2GHz.
April - 2007Applied Software Engineering Lab, UOU 16/20
Results 2
•Bit Vector - OptimizeCompare with other ApproachCP : explanation-based Constraint ProgrammingM : Matric-enhanced
April - 2007Applied Software Engineering Lab, UOU 17/20
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
April - 2007Applied Software Engineering Lab, UOU 18/20
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.
April - 2007Applied Software Engineering Lab, UOU 19/20
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 pro
gram.
April - 2007Applied Software Engineering Lab, UOU 20/20
4 배수 만들기 페이지