banaras hindu university -...
TRANSCRIPT
![Page 1: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/1.jpg)
Banaras Hindu University
![Page 2: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/2.jpg)
A Course on
Software Reuse by Design Patterns and Frameworks
![Page 3: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/3.jpg)
by
Dr. Manjari Gupta Department of Computer Science
Banaras Hindu University
![Page 4: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/4.jpg)
Lecture 7
Issues and Challenges in Design Pattern Detection
![Page 5: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/5.jpg)
∗ not only beneficial to the forward engineering process
∗ patterns can also indicate the design rationale behind the system’s implementation
∗ can aid in code comprehension
Design Pattern Detection
![Page 6: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/6.jpg)
∗ no support for documenting the presence and usage of patterns in code
∗ reflect the designers’ intents ∗ ongoing research into correlations between the use of
Design Patterns and defect frequency ∗ Design document is often missing in many legacy
systems ∗ helps on program comprehension and design
visualization ∗ Code maintenance would be made easier
Importance of Design Pattern Detection
![Page 7: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/7.jpg)
∗ should automatic ∗ should detect nonstandard implementations of design
patterns along with their standard implementations ∗ should fast ∗ should not specific to few particular design patterns. ∗ should be customizable ∗ should detect as less number of false positive and false
negative patterns as possible.
Important features of a method for detecting Design Patterns
![Page 8: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/8.jpg)
∗ executable code- static and dynamic analyses, ∗ documentation of source codes, ∗ design model (UML designs) and ∗ other specifications.
Product used for DPD
![Page 9: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/9.jpg)
∗ must accurately reflect the traits of each pattern ∗ Must differentiate one pattern from other patterns ∗ strictness of definition ∗ more redundancy in a pattern’s definition, the
more false positives ∗ formal design patterns definition is required
Design Pattern Definition
![Page 10: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/10.jpg)
∗ based on the decomposition approach. ∗ getting idea about EDPs or meta patterns ∗ Design patterns are expressed exclusively through EDPs ∗ Hayashi et al [Hayashi08] used Pree’s meta patterns to
represent these common properties ∗ checked if the pre-defined conditions of the design pattern,
including the combination conditions of the meta patterns, hold or not.
∗ If it fails in this stage, they moved to other patterns that have the same meta patterns. ∗ reduce any redundant repetition of checking meta patterns
Design pattern detection based on their common properties
![Page 11: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/11.jpg)
∗ pattern detection tools includes three parts ∗ a parser, a detector, and a database.
∗ challenges in pattern detection ∗ the size of the exploration space for large software
systems.
Approaches to detect design patterns
![Page 12: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/12.jpg)
∗ similarity score algorithm to detect design patterns. ∗ structural relations between classes are encoded in
multiple graphs and matrices. ∗ similarly the design patterns are also encoded in
matrices. ∗ similarity score between the matrices of system
source and those of patterns.
Tsantalis et al. approach
![Page 13: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/13.jpg)
∗ SPQR ∗ System for Pattern Query and Recognition ∗ developed at the University of Carolina ∗ uses Elemental Design Patterns, a theorem prover
and ρ-calculus to detect DPs.
Tools for DPD
![Page 14: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/14.jpg)
∗ Fujaba [Niere02] ∗ forward and reverse engineering tool ∗ developed at the University of Paderborn ∗ uses graph matching on abstract syntax graphs
representing source code, combined with fuzzy logic. ∗ treat design and implementation variants of patterns
separately.
Tools for DPD Cont…
![Page 15: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/15.jpg)
∗ Ptidej [Gueheneuc05] ∗ visual tool for design recovery and DP recognition. ∗ Detection is performed through constraints
satisfaction with explanation
Tools for DPD Cont…
![Page 16: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/16.jpg)
∗ system and patterns, they can be represented in the form of matrices.
DPD based on only structural and static analysis [Pande10]
![Page 17: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/17.jpg)
Calculation of matrices for system design
Client
AbstractFactory
+CreateProduct()
AbstractProduct
ConcreteFactory ConcreteProduct
![Page 18: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/18.jpg)
Calculation of matrices for system design
Client
AbstractFactory
+CreateProduct()
AbstractProduct
ConcreteFactory ConcreteProduct Direct Association matrix of Fig. 1 (root = 3)
![Page 19: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/19.jpg)
Calculation of matrices for system design
Client
AbstractFactory
+CreateProduct()
AbstractProduct
ConcreteFactory ConcreteProduct Direct Association matrix of Fig. 1 (root = 3)
Dependency matrix Fig. 1 (root = 2)
![Page 20: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/20.jpg)
Calculation of matrices for system design
Client
AbstractFactory
+CreateProduct()
AbstractProduct
ConcreteFactory ConcreteProduct Direct Association matrix Dependency matrix Generalization matrix of Fig. 1 (root = 3) of Fig. 1 (root = 2) of Fig. 1 (root = 5)
![Page 21: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/21.jpg)
Calculation of matrices for system design
Client
AbstractFactory
+CreateProduct()
AbstractProduct
ConcreteFactory ConcreteProduct Direct Association matrix Dependency matrix Generalization matrix of Fig. 1 (root = 3) of Fig. 1 (root = 2) of Fig. 1 (root = 5)
Overall Matrix
![Page 22: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/22.jpg)
Calculation of matrices for Façade design pattern
Facade
Subsystem Classes
Façade Design Pattern
![Page 23: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/23.jpg)
Calculation of matrices for Façade design pattern
Facade
Subsystem Classes
Façade Design Pattern
Direct Association matrix of fig 5 (root = 2)
![Page 24: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/24.jpg)
Calculation of matrices for Façade design pattern
Facade
Subsystem Classes
Façade Design Pattern
Direct Association matrix of fig 5 (root = 2)
Overall Matrix
![Page 25: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/25.jpg)
Calculation of matrices for Façtory Method design pattern
Factory Method Design Pattern
Product
ConcreteProduct
Creator
+FactoryMethod()
ConcreteCreator
![Page 26: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/26.jpg)
Calculation of matrices for Façtory Method design pattern
Factory Method Design Pattern
Product
ConcreteProduct
Creator
+FactoryMethod()
ConcreteCreator
Dependency matrix of fig 2 (root = 3)
![Page 27: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/27.jpg)
Calculation of matrices for Façtory Method design pattern
Factory Method Design Pattern
Product
ConcreteProduct
Creator
+FactoryMethod()
ConcreteCreator
Dependency matrix of fig 2 Generalization matrix of fig 2 (root = 3) (root = 5)
![Page 28: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/28.jpg)
Calculation of matrices for Façtory Method design pattern
Factory Method Design Pattern
Product
ConcreteProduct
Creator
+FactoryMethod()
ConcreteCreator
Dependency matrix of fig 2 Generalization matrix of fig 2 (root = 3) (root = 5)
Overall Matrix
![Page 29: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/29.jpg)
Calculation of matrices for singleton design pattern
Singleton
+Instance(): Singleton -instance
Singleton Design Pattern
![Page 30: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/30.jpg)
Calculation of matrices for singleton design pattern
Singleton
+Instance(): Singleton -instance
Singleton Design Pattern
[ 1 ] Direct Association matrix of fig 5 (root = 2)
![Page 31: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/31.jpg)
Calculation of matrices for singleton design pattern
Singleton
+Instance(): Singleton -instance
Singleton Design Pattern
[ 1 ] Direct Association matrix of fig 5 (root = 2)
[21]
![Page 32: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/32.jpg)
Calculation of matrices for singleton design pattern
Singleton
+Instance(): Singleton -instance
Singleton Design Pattern
[ 1 ] Direct Association matrix of fig 5 (root = 2)
[21]
[2] Overall Matrix
![Page 33: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/33.jpg)
∗ determine whether a graph is isomorphic to a subgraph of another graph.
∗ is NP-complete. ∗ G1 (V1, E1) and G2 (V2, E2) be two graphs ∗ M1 and M2 be the adjacency matrices ∗ A permutation matrix is a square (0, 1)-matrix ∗ G1 (M1, Lv, Le) and G2 (M2, Lv, Le) are said to be
isomorphic if there exist a permutation matrix P such that
M2 = P M1 PT
Sub-graph isomorphism detection
![Page 34: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/34.jpg)
∗ Given an n x n matrix M = (mij), let Sk,m(M) denote the k x m matrix that is obtained from M by deleting rows k + 1 , . . . , n and columns m + 1 , . . . , n, where k, m < n.
∗ Let G1 and G2 be graphs with adjacency matrices M1 and M2 of dimensions m x m and n x n respectively, where m < =n. There is a subgraph isomorphism from G1 to G2 if there exists an n x n permutation matrix P such that
M1 = Sm, m (P M2 PT) M2 -system design matrix and M1 -design pattern matrix
Sub-graph isomorphism detection
![Page 35: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/35.jpg)
Design Pattern Detection as Façade Design Pattern
![Page 36: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/36.jpg)
Design Pattern Detection as Façade Design Pattern
P =
![Page 37: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/37.jpg)
Design Pattern Detection as Façade Design Pattern
P = PT =
![Page 38: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/38.jpg)
Design Pattern Detection as Façade Design Pattern
P = PT =
PSPT =
![Page 39: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/39.jpg)
Design Pattern Detection as Façade Design Pattern
P = PT =
PSPT =
After eliminating entries from 3rd row and 3rd column we have reduced matrix as (because Façade Design Pattern is of 2 x 2 order)
![Page 40: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/40.jpg)
Design Pattern Detection as Factory Method Design Pattern
![Page 41: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/41.jpg)
Design Pattern Detection as Factory Method Design Pattern
![Page 42: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/42.jpg)
Design Pattern Detection as Factory Method Design Pattern
![Page 43: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/43.jpg)
Design Pattern Detection as Factory Method Design Pattern
![Page 44: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/44.jpg)
Design Pattern Detection as Factory Method Design Pattern
![Page 45: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/45.jpg)
Design Pattern Detection as Factory Method Design Pattern
After eliminating 5th row and 5th column (since factory method has order 4 x 4),
![Page 46: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/46.jpg)
∗ For singleton there will be no permutation matrix for which we can find out (after row and column elimination) a matrix which is equivalent to design pattern matrix.
Particular Design Pattern may or may not exist
![Page 47: Banaras Hindu University - eacharya.inflibnet.ac.ineacharya.inflibnet.ac.in/.../ET/9-7-ET-V1-S1__ppt7.pdf · * based on the decomposition approach. * getting idea about EDPs or meta](https://reader033.vdocuments.us/reader033/viewer/2022050218/5f63e24002022f38c03949f6/html5/thumbnails/47.jpg)