2. Outline
Ptidej
in a Nutshell
Brief History
Main Characteristics
Demo
– Reverse Engineering of JHD v5.1
– Identification of Design Motifs, Defects
– Model Transformations and External Tools
2/16
Thoughts
for Discussions
3. Ptidej in a Nutshell
3/16
Ptidej: Pattern Trace Identification, Detection,
and Enhancement in Java
Tool suite to develop theories and methods to
evaluate and improve the quality of objectoriented programs by promoting the use of
idioms, design patterns, and architectural
patterns
– Research
– Education
4. Brief History
1999: Birth
– Hervé Albin-Amiot creates DPL
(Design Pattern Language), a
meta-model for design motifs
– Creation of the Ptidej Team to
develop and enhance the tool
suite at University of Montreal
– Parser for AOL
– Parser for AspectJ
– Parser for a subset of C++
– DSL for design defects
specification and identification
– Identification of micro-patterns
2001–2003: Childhood
– DPL becomes PADL to describe
programs and motifs
• Parser for Java
– Caffeine is developed to analyse
dynamically Java programs
– Explanation-based constraint
programming to identify motifs
– Visualisation of systems, motifs,
occurrences
4/16
2003–2007: Teenage days
2008: ?
5. Main Characteristics
Today
– 30 JDT projects
– 200 packages
– 1,150 classes
– 80,000 LOC
Contributions
of several master and
Ph.D. students
Used in several publications, see
5/16
www.ptidej.net/publications
8. Main Characteristics
Some
hot spots
to add new constituents
IBuilder to draw graphic representations
IPADLAnalysis to add new PADL analyses
IDesignMotif to add new design motifs
IPtidejAnalysis to add new Ptidej analyses
IExtension to extend the UI
IWindow to add new window in the UI
– IFactory
–
–
–
–
–
–
8/16
9. Demo
Reverse Engineering
A
.ptidej file lists a set of file to be
parsed and their languages
[Ptidej Project]
Name = DPL - JHotDraw v5.1
JavaCode = ../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/applet/;../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/application/;../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/contrib/;../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/figures/;../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/framework/;../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/samples/javadraw/;../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/samples/net/;../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/samples/nothing/;../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/samples/pert/;../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/standard/;../../../DPL - JHotDraw
v5.1/bin/CH/ifa/draw/util/
9/16
16. Thoughts for Discussions
More
information at www.ptidej.net
Language
independence
– See WOOR’06 and ’07 workshop reports
Framework
independence
Framework documentation
16/16
– API
– Hot spots
– Design patterns and defects