1. A Pragmatic Study of
Binary Class Relationships
Recovering relevant UML-like class diagrams with Ptidej
Yann-Gaël Guéhéneuc
Hervé Albin-Amiot
guehene@iro.umontreal.ca, albin@emn.fr
École des Mines Object Technology Université de Montréal,
de Nantes, France International, Inc., Canada Canada
2. Objectives
n Long term: Automated help to
understand and to document object-
oriented programs
– Abstract implementation-level artefacts
n Shortterm: Produce relevant UML-like
class diagrams and (design) pattern
representations from source code
2/6
3. Needs
n Tobridge the discontinuity between
source code and class diagrams
– Precise definitions of class-diagram
artefacts: Class/interface, relationships
– Models to describe source code and class-
diagram artefacts
– Static and dynamic analyses tools to
generate the models
3/6
4. Relationships in a nutshell
n A B
Association
– Says that instances of a class A send
messages to instances of a class B
n A B
Aggregation
– Association in which the whole (A) declares
a part (B) (a field in the whole)
n A B
Composition
– Aggregation in which the part (B) belongs
4/6 exclusively to the whole (A)
5. Tools
n PDL1: To describe source code, UML-like
class diagrams, design patterns
n Caffeine: To obtain and abstract dynamic
information from program executions
n Ptidej2: To serve as a front-end to other
tools and to display class diagrams
5/6 1: Pattern (and Abstract-level) Description Language
2: Pattern Trace Identification, Detection, and Enhancement in Java
6. Frame Panel
Association
DrawingEditor DrawingView
Tool Drawing
Association
Instanciation
Interface
Handle Figure
AbstractFigure
Tools in action Agrégation
AttributeFigure DecoratorFigure PolyLineFigure CompositeFigure
6/6
Classe