Automating Google Workspace (GWS) & more with Apps Script
CSMR10b.ppt
1. ROOTS
DPDx – A Common Result Exchange Format
for Design Pattern Detection
Günter Kniesel Péter Hegedũs Alexander Chatzigeorgiou Yann-Gaël Guéhéneuc
Alexander Binun Lajos Jenő Fülöp Nikolaos Tsantalis
University of Bonn University of Szeged University of Macedonia École Polytechnique de Montréal
Bonn, Germany Szeged, Hungary Thessaloniki, Greece Québec, Canada
{gk, binun} {hpeter, flajos} {achat, nikos} yann-gael.gueheneuc
@iai.uni-bonn.de @inf.u-szeged.hu @java.uom.gr @polymtl.ca
2. Relevance
DPD = complex program analysis
program structure
behaviour
static and dynamic relations
DPD result fusion = combining different program analysis results
Results of tool B
Results of tool A Results of tool C
DPD result fusion
Inproved result
G. Kniesel, A. Binun: Standing on the shoulders of giants - A data fusion approach to design
pattern detection. ICPC 2009, pp. 208-217.
DPDX - 2 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS
3. Why Exchange Results?
Detection Visualisation
Detection Visualisation
Detection Visualisation
Repository
Common Interchange Format Results and
Assessments
Result Fusion Asessment
Result Fusion Asessment
Result Fusion Asessment
DPDX - 3 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS
4. Why a Specific Format?
General format Specific format
Can do many things Can do a one thing well
No unnecessary generality
(no extra meta-levels)
Easy to write / implement
Easy to read / understand
Compact
DPDX - 4 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS
5. ChallengeDifferences
Problem definitions
Analysis techniques 95%
Challenge to agree
Levels of detail on what
to exchange
Terminology
Result formats 5%
Challenge to
agree on syntax
DPDX - 5 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS
6. Design Motifs as UML Templates
Decorator
Class role
Field role
Method role Component
component
operation()
Relationship
ConcreteComponent Decorator
operation() Statement role
component.operation()
Optional Role ConcreteDecorator
operation()
DPDX - 6 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS
7. Approach Overview
Metamodel of Metamodel of Metamodel of
Design Motifs DPD Results Program Element IDs
conformsTo conformsTo conformsTo
Results
Roles and of tool T for program P IDs of elements
relations of program P
Mappings
of roles and
relations to IDs
Singleton
Decorator
DPDX - 7 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS
8. Program IDs = Navigation Paths
package java.io; java.io
public class BufferedWriter extends Writer { BufferedWriter
private Writer out; Writer
public void write(char[] cbuf, int off, int len) ... { write(char[], int, int)
synchronized (lock) { 1st statement, body part
ensureOpen();
if (...) ... else ...
if (...) { 3rd statement, then part
flushBuffer();
out.write(cbuf, off, len) 2nd statement, call part
...
}
...
} } }
DPDX - 8 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS
9. Program IDs = Navigation Paths
package java.io;
public class BufferedWriter extends Writer { Named Elements
private Writer out;
public void write(char[] cbuf, int off, int len) ... { Typed Elements
synchronized (lock) { Indexed Elements
ensureOpen();
if (...) ... else ...
if (...) { Block Names
flushBuffer();
out.write(cbuf, off, len)
...
}
...
} } }
DPDX - 9 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS
10. Program Element IDs
ID Metamodel ProgramElementID
parent elementKind: String
1
ref
Name Signature Index BlockName
1..*
name: String name: String indexInParent: int nameInParent: String
kind {class, kind kind {block}
interface, field, {method} kind {block, ...}
basicType}
Sample ID Body of the synchronized block that is the first statement in the ... method of .
:Name :Signature :Index :Block
class method synchronized block
java.io.BufferedWriter write 1 body
DPDX - 10 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS
11. Metamodel of Design Motifs
containedRoles
*
variantOf
1 1..* 1 *
Motif Role Property
roles
name : String name : String name : String
* kind : String value : String
target cardinality : String source strict : Bool
1 1
Relation
1 1
name : String
srcCard : String
targetCard : String
direct : Bool
DPDX - 11 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS
12. Metamodel of DPD Results
1 DPD Result 1
Tool Program
name: String diagnostics 1..* name: String
version : String version : String
Diagnostic language: String
motif : String
0,1
Justification
0,1 explanation : String
roleAssignments 1..* score : Real
1
Role RoleAssignment
player 1
ProgramElementID
source 1 1 target
Relation RelationAssignment
1
relationAssignments 1..*
DPDX - 12 CSMR, Madrid, March 16, 2010 G. Kniesel ROOTS