csmr10b.ppt
DESCRIPTION
TRANSCRIPT
![Page 1: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/1.jpg)
R O O T S
DPDx – A Common Result Exchange Format for Design Pattern Detection
Günter KnieselAlexander Binun
University of BonnBonn, Germany
{gk, binun}@iai.uni-bonn.de
Yann-Gaël Guéhéneuc
École Polytechnique de MontréalQuébec, Canada
Péter HegedũsLajos Jenő Fülöp
University of SzegedSzeged, Hungary
{hpeter, flajos}@inf.u-szeged.hu
Alexander ChatzigeorgiouNikolaos Tsantalis
University of MacedoniaThessaloniki, Greece
{achat, nikos}@java.uom.gr
![Page 2: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/2.jpg)
DPDX - 2 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Relevance
DPD = complex program analysis program structure behaviour static and dynamic relations
DPD result fusion = combining different program analysis results
G. Kniesel, A. Binun: Standing on the shoulders of giants - A data fusion approach to design pattern detection. ICPC 2009, pp. 208-217.
DPD result fusion
Results of tool AResults of tool B
Results of tool C
Inproved result
![Page 3: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/3.jpg)
DPDX - 3 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Why Exchange Results?
VisualisationDetection
Result Fusion
VisualisationDetection
Result Fusion
VisualisationDetection
Result Fusion
Common Interchange Format Results and Assessments
Repository
AsessmentAsessment
Asessment
![Page 4: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/4.jpg)
DPDX - 4 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Why a Specific Format?
General format Can do many things
Specific format Can do a one thing well
No unnecessary generality (no extra meta-levels)
Easy to write / implement Easy to read / understand Compact
![Page 5: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/5.jpg)
DPDX - 5 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
ChallengeDifferences
Problem definitions
Analysis techniques
Levels of detail
Terminology
Result formats
95% Challenge to agree on whatto exchange
5% Challenge to agree on syntax
![Page 6: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/6.jpg)
DPDX - 6 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Design Motifs as UML Templates Decorator
component
ConcreteDecoratoroperation()
Componentoperation()
ConcreteComponent Decorator
operation()component.operation()
Class role
Method role
Relationship
Field role
Statement role
Optional Role
![Page 7: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/7.jpg)
DPDX - 7 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Approach Overview
Metamodel ofDesign Motifs
Singleton
Metamodel ofDPD Results
Decorator
conformsToconformsTo
Metamodel ofProgram Element IDs
Mappings of roles and
relations to IDs
Resultsof tool T for program P
conformsTo
IDs of elementsof program P
Roles and relations
![Page 8: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/8.jpg)
DPDX - 8 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Program IDs = Navigation Paths
package java.io;
public class BufferedWriter extends Writer {
private Writer out;
public void write(char[] cbuf, int off, int len) ... {
synchronized (lock) {ensureOpen();if (...) ... else ...if (...) {
flushBuffer();out.write(cbuf, off, len)...
}...
} } }
java.io
BufferedWriter
Writer
write(char[], int, int)
1st statement, body part
3rd statement, then part
2nd statement, call part
![Page 9: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/9.jpg)
DPDX - 9 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Program IDs = Navigation Paths
package java.io;
public class BufferedWriter extends Writer {
private Writer out;
public void write(char[] cbuf, int off, int len) ... {
synchronized (lock) {ensureOpen();if (...) ... else ...if (...) {
flushBuffer();out.write(cbuf, off, len)...
}...
} } }
Named Elements
Typed Elements
Indexed Elements
Block Names
![Page 10: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/10.jpg)
DPDX - 10 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Program Element IDs
ProgramElementID
SignatureNamename: String name: String
parent1
IndexindexInParent: int
BlockNamenameInParent: String
1..*
kind {class, interface, field,
basicType}
kind {method}
kind {block}kind {block, ...}
ref
elementKind: String
:Nameclass
java.io.BufferedWriter
:Signaturemethodwrite
:Indexsynchronized
1
:Blockblockbody
ID Metamodel
Sample ID Body of the synchronized block that is the first statement in the ... method of .
![Page 11: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/11.jpg)
DPDX - 11 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Metamodel of Design Motifs
RoleMotif
Relation
name : Stringkind : Stringcardinality : String source
1
1
target1
1..*
1name : StringsrcCard : StringtargetCard : Stringdirect : Bool
name : Stringvaria
ntO
f
*
rolesProperty
name : Stringvalue : Stringstrict : Bool
*11
containedRoles
*
![Page 12: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/12.jpg)
DPDX - 12 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Metamodel of DPD Results
RoleAssignment
Diagnostic
1..*
motif : String
1 1
1player
roleAssignments
DPD Result
name: Stringversion : String
Toolname: String
version : Stringlanguage: String
Program
1..*diagnostics
1 1
source target
explanation : Stringscore : Real
0,1
0,1Justification
1..*relationAssignments
Role
Relation
1
1RelationAssignment
ProgramElementID
![Page 13: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/13.jpg)
DPDX - 13 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
ImplementationXSD and XML
![Page 14: CSMR10b.ppt](https://reader036.vdocument.in/reader036/viewer/2022081907/547a4817b47959a9098b49a3/html5/thumbnails/14.jpg)
DPDX - 14 CSMR, Madrid, March 16, 2010 G. Kniesel R O O T S
Conclusions
Specification Element IDs Design Motifs Detection Results
Implementation XML Schema Definition (XSD) Sample translator and visualizer
Properties Completeness Language independence Reproducibility, Comparability, Justifiability
Portal:http://sewiki.iai.uni-bonn.de/dpdx/