SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Un méta-modèle pour coupler
application et détection
des design patterns
Hervé Albin-Amiot
Pierre Cointe
Yann-Gaël Guéhéneuc
{albin, cointe, guehene}@emn.fr
École des Mines
de Nantes, France
Soft-Maint S.A.,
France
Object Technology
International Inc., Canada
2/17
Plan
 Le contexte
 Notre objectif
 Nos besoins
 Travaux connexes
 Notre solution : le méta-modèle PDL
 PDL : principe & mise en œuvre
 Questions ouvertes
3/17
Le contexte
Améliorer la qualité des développements
par objets en favorisant l’utilisation des
design patterns pour aider à :
– Implémenter
– Comprendre
– Documenter
4/17
Notre objectif
 Fournir un assistant logiciel aidant à :
– L’implémentation
• Sélection
• Paramétrage
• Génération
– La compréhension et la documentation :
détection de formes exactes
Application
5/17
Nos besoins
 Formaliser les design patterns
 Décrire les design patterns en tant que :
– Entités de « première classe »
• Elles savent comment produire du code
• Elles savent identifier leurs propres
occurrences dans du code
– Entités manipulables
• Sur lesquelles on peut raisonner
• Que l’on peut adapter à un contexte spécifique
– Entités avec « traces »
6/17
Travaux connexes
 Formalisation :
– LePUS [Eden 2000]
– Fragment Model [Florjin et al. 1997]
 Application
– [Budinsky et al. 1996]
 Détection
– [Wuyts 1998], [Antoniol et al. 1998]
7/17
Notre solution :
le méta-modèle PDL
8/17
PDL : principe
build()  build() 
Modèle abstrait Composite
Modèle concret Composite 1
Code Composite 1 Code Composite n
Modèle concret Composite n
Code Composite 2
Modèle concret Composite 2
Paramétrage
Méta-entité
Composite
Méta-entité
Proxy
Méta-entité
Observer
Méta-entité
générique Pattern
Décrivent
Spécialisation
RaffinementConstituants
Méta-modèle de patterns
Instanciation




build() 
Sélection
Paramétrage
Application
9/17
PDL : mise en œuvre
Description
Traduction en un
modèle de pattern
Descriptions
informelles du [GoF]
Instance de PInterface
Instance de PClass
Instance de PAssoc
Instance de PDelegation
name() Instance de PMethod
Instance de Pattern
Légende
10/17
PDL : mise en œuvre
Application
Button
paint()
Label
paint( )
Window
paint( )
addComponent(Component)
removeComponent(Component)
listComponent( )
Component
paint( )
*
components
Code source
Java, Claire
Paramétrage
Génération
11/17
PDL : mise en œuvre
Détection
Code source Java
Design pattern
détecté ?
Reconstruction
Comparaison
(arc consistance + algorithmes dédiés)
12/17
Quelques résultats expérimentaux
 Application
– Ptidej
 Détection sur plusieurs frameworks :
– java.awt.*
– JHotDraw
– JUnit
– PatternsBox
– Ptidej
13/17
Détection
java.awt.* 121 1 1 1
JHotDraw 155 1 1 0,3
JUnit 34 1 1 0,4
JEdit 248 1,4
PatternsBox 52 0,3
java.aw t.* 121 0,2
JHotDraw 155 1 3 2 0,4
JUnit 34 1 1 0,2
JEdit 248 0,4
PatternsBox 52 0,3
java.aw t.* 121 3 1,1
JHotDraw 155 2 2 1 1 0,5
JUnit 34
JEdit 248 0,1
PatternsBox 52 0,2
java.aw t.* 121
JHotDraw 155 3 3 0,1
JUnit 34
JEdit 248 1 1 0,1
PatternsBox 52
java.aw t.* 121 3,4
JHotDraw 155 2 2 3,2
JUnit 34 4 4 2,5
JEdit 248 3 3 13
PatternsBox 52 1 1 2,8
java.aw t.* 121 3 3 0,7
JHotDraw 155 2 2 0,5
JUnit 34 0,4
JEdit 248 1
PatternsBox 52 1 1 0,5
610 29 28 2 3 5,8
Iterator
NOC
Composite
Decorator
Factory
Method
Existing
Observer
Singleton
Détection dans PatternsBox
Hits Missed False hits
Time
(sec.)
Design
patterns
Frameworks
14/17
Réalisation de l’objectif
 Décrire, appliquer et détecter les design
patterns
– Entités de première classe manipulables
 Nous avons un assistant aidant :
– L’implémentation
– La détection et la documentation de formes
exactes de design patterns
(Cet assistant est « relativement » simple)
15/17
Questions ouvertes 1/3
 Par rapport au contexte :
Améliorer la qualité des
développements par objets en
favorisant l’utilisation des design
patterns
16/17
Questions ouvertes 2/3
 Formalisation :
– Un unique méta-modèle est-il suffisant ?
– Comment représenter les compromis ?
 Application :
– Comment bien décrire le code source ?
– Est-ce qu’elle est toujours possible et
intéressante ?
17/17
Questions ouvertes 3/3
 Compréhension :
– Est-il possible de détecter les formes
exactes de n’importe quel design pattern ?
– Est-il possible de détecter les formes
approchées de n’importe quel design
pattern ?

Mais conteúdo relacionado

Semelhante a Jcom02.ppt

Livret bleu qualitelogicielle_gt-logiciellibre_systematic
Livret bleu qualitelogicielle_gt-logiciellibre_systematicLivret bleu qualitelogicielle_gt-logiciellibre_systematic
Livret bleu qualitelogicielle_gt-logiciellibre_systematic
Pascal Flamand
 
2.presentation merise
2.presentation merise2.presentation merise
2.presentation merise
shaheenyaar
 
2 relation-acteurs-projet
2 relation-acteurs-projet2 relation-acteurs-projet
2 relation-acteurs-projet
briann_guillaud
 
Cypyth formation-programmation-objet-en-langage-python
Cypyth formation-programmation-objet-en-langage-pythonCypyth formation-programmation-objet-en-langage-python
Cypyth formation-programmation-objet-en-langage-python
CERTyou Formation
 
15 03 16_data sciences pour l'actuariat_f. soulie fogelman
15 03 16_data sciences pour l'actuariat_f. soulie fogelman15 03 16_data sciences pour l'actuariat_f. soulie fogelman
15 03 16_data sciences pour l'actuariat_f. soulie fogelman
Arthur Charpentier
 
Revues de code - Forum PHP 2010
Revues de code - Forum PHP 2010Revues de code - Forum PHP 2010
Revues de code - Forum PHP 2010
Jean-Marc Fontaine
 
1_Assurance_Qualit_et_Gnie_Logiciel.ppt
1_Assurance_Qualit_et_Gnie_Logiciel.ppt1_Assurance_Qualit_et_Gnie_Logiciel.ppt
1_Assurance_Qualit_et_Gnie_Logiciel.ppt
hbadir
 

Semelhante a Jcom02.ppt (20)

Livret bleu qualitelogicielle_gt-logiciellibre_systematic
Livret bleu qualitelogicielle_gt-logiciellibre_systematicLivret bleu qualitelogicielle_gt-logiciellibre_systematic
Livret bleu qualitelogicielle_gt-logiciellibre_systematic
 
Introduction à l'approche ADM de l'OMG
Introduction à l'approche ADM de l'OMGIntroduction à l'approche ADM de l'OMG
Introduction à l'approche ADM de l'OMG
 
Comprendre la planification de projets
Comprendre la planification de projetsComprendre la planification de projets
Comprendre la planification de projets
 
Analyse de la propriete intellectuel
Analyse de la propriete intellectuelAnalyse de la propriete intellectuel
Analyse de la propriete intellectuel
 
Forum PHP 2010 - Les frameworks, essentiels dans-l-ecosysteme-php-xavier-laco...
Forum PHP 2010 - Les frameworks, essentiels dans-l-ecosysteme-php-xavier-laco...Forum PHP 2010 - Les frameworks, essentiels dans-l-ecosysteme-php-xavier-laco...
Forum PHP 2010 - Les frameworks, essentiels dans-l-ecosysteme-php-xavier-laco...
 
2.presentation merise
2.presentation merise2.presentation merise
2.presentation merise
 
2 relation-acteurs-projet
2 relation-acteurs-projet2 relation-acteurs-projet
2 relation-acteurs-projet
 
De l’open source à l’open cloud
De l’open source à l’open cloudDe l’open source à l’open cloud
De l’open source à l’open cloud
 
PRESENTTION_DU_PROJET_DE_SUPER_021337.docx
PRESENTTION_DU_PROJET_DE_SUPER_021337.docxPRESENTTION_DU_PROJET_DE_SUPER_021337.docx
PRESENTTION_DU_PROJET_DE_SUPER_021337.docx
 
La Meta-programmation
La Meta-programmation La Meta-programmation
La Meta-programmation
 
Cypyth formation-programmation-objet-en-langage-python
Cypyth formation-programmation-objet-en-langage-pythonCypyth formation-programmation-objet-en-langage-python
Cypyth formation-programmation-objet-en-langage-python
 
L’implantation d’un système de gestion documentaire
L’implantation d’un système de gestion documentaireL’implantation d’un système de gestion documentaire
L’implantation d’un système de gestion documentaire
 
15 03 16_data sciences pour l'actuariat_f. soulie fogelman
15 03 16_data sciences pour l'actuariat_f. soulie fogelman15 03 16_data sciences pour l'actuariat_f. soulie fogelman
15 03 16_data sciences pour l'actuariat_f. soulie fogelman
 
Automatisation des tests - objectifs et concepts - partie 2
Automatisation des tests  - objectifs et concepts - partie 2Automatisation des tests  - objectifs et concepts - partie 2
Automatisation des tests - objectifs et concepts - partie 2
 
Construire un Design System dans une société d'assurance centenaire
Construire un Design System dans une société d'assurance centenaireConstruire un Design System dans une société d'assurance centenaire
Construire un Design System dans une société d'assurance centenaire
 
20120124 05 - Le Model-based Testing aujourd'hui (Inria)
20120124 05 - Le Model-based Testing aujourd'hui (Inria)20120124 05 - Le Model-based Testing aujourd'hui (Inria)
20120124 05 - Le Model-based Testing aujourd'hui (Inria)
 
Ihm introduction
Ihm introductionIhm introduction
Ihm introduction
 
AlterWay SolutionsLinux Outils Industrialisation PHP
AlterWay SolutionsLinux Outils Industrialisation PHPAlterWay SolutionsLinux Outils Industrialisation PHP
AlterWay SolutionsLinux Outils Industrialisation PHP
 
Revues de code - Forum PHP 2010
Revues de code - Forum PHP 2010Revues de code - Forum PHP 2010
Revues de code - Forum PHP 2010
 
1_Assurance_Qualit_et_Gnie_Logiciel.ppt
1_Assurance_Qualit_et_Gnie_Logiciel.ppt1_Assurance_Qualit_et_Gnie_Logiciel.ppt
1_Assurance_Qualit_et_Gnie_Logiciel.ppt
 

Mais de Yann-Gaël Guéhéneuc

Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Yann-Gaël Guéhéneuc
 
Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3
Yann-Gaël Guéhéneuc
 
On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6
Yann-Gaël Guéhéneuc
 

Mais de Yann-Gaël Guéhéneuc (20)

Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5
 
Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1
 
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22
 
Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3
 
Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9
 
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
 
An Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its ConsequencesAn Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its Consequences
 
Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0
 
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
 
Well-known Computer Scientists v1.0.2
Well-known Computer Scientists v1.0.2Well-known Computer Scientists v1.0.2
Well-known Computer Scientists v1.0.2
 
On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1
 
On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6
 
ICSOC'21
ICSOC'21ICSOC'21
ICSOC'21
 
Vissoft21.ppt
Vissoft21.pptVissoft21.ppt
Vissoft21.ppt
 
Service computation20.ppt
Service computation20.pptService computation20.ppt
Service computation20.ppt
 
Serp4 iot20.ppt
Serp4 iot20.pptSerp4 iot20.ppt
Serp4 iot20.ppt
 
Msr20.ppt
Msr20.pptMsr20.ppt
Msr20.ppt
 
Iwesep19.ppt
Iwesep19.pptIwesep19.ppt
Iwesep19.ppt
 
Icsoc20.ppt
Icsoc20.pptIcsoc20.ppt
Icsoc20.ppt
 
Icsoc18.ppt
Icsoc18.pptIcsoc18.ppt
Icsoc18.ppt
 

Jcom02.ppt

  • 1. Un méta-modèle pour coupler application et détection des design patterns Hervé Albin-Amiot Pierre Cointe Yann-Gaël Guéhéneuc {albin, cointe, guehene}@emn.fr École des Mines de Nantes, France Soft-Maint S.A., France Object Technology International Inc., Canada
  • 2. 2/17 Plan  Le contexte  Notre objectif  Nos besoins  Travaux connexes  Notre solution : le méta-modèle PDL  PDL : principe & mise en œuvre  Questions ouvertes
  • 3. 3/17 Le contexte Améliorer la qualité des développements par objets en favorisant l’utilisation des design patterns pour aider à : – Implémenter – Comprendre – Documenter
  • 4. 4/17 Notre objectif  Fournir un assistant logiciel aidant à : – L’implémentation • Sélection • Paramétrage • Génération – La compréhension et la documentation : détection de formes exactes Application
  • 5. 5/17 Nos besoins  Formaliser les design patterns  Décrire les design patterns en tant que : – Entités de « première classe » • Elles savent comment produire du code • Elles savent identifier leurs propres occurrences dans du code – Entités manipulables • Sur lesquelles on peut raisonner • Que l’on peut adapter à un contexte spécifique – Entités avec « traces »
  • 6. 6/17 Travaux connexes  Formalisation : – LePUS [Eden 2000] – Fragment Model [Florjin et al. 1997]  Application – [Budinsky et al. 1996]  Détection – [Wuyts 1998], [Antoniol et al. 1998]
  • 7. 7/17 Notre solution : le méta-modèle PDL
  • 8. 8/17 PDL : principe build()  build()  Modèle abstrait Composite Modèle concret Composite 1 Code Composite 1 Code Composite n Modèle concret Composite n Code Composite 2 Modèle concret Composite 2 Paramétrage Méta-entité Composite Méta-entité Proxy Méta-entité Observer Méta-entité générique Pattern Décrivent Spécialisation RaffinementConstituants Méta-modèle de patterns Instanciation     build()  Sélection Paramétrage Application
  • 9. 9/17 PDL : mise en œuvre Description Traduction en un modèle de pattern Descriptions informelles du [GoF] Instance de PInterface Instance de PClass Instance de PAssoc Instance de PDelegation name() Instance de PMethod Instance de Pattern Légende
  • 10. 10/17 PDL : mise en œuvre Application Button paint() Label paint( ) Window paint( ) addComponent(Component) removeComponent(Component) listComponent( ) Component paint( ) * components Code source Java, Claire Paramétrage Génération
  • 11. 11/17 PDL : mise en œuvre Détection Code source Java Design pattern détecté ? Reconstruction Comparaison (arc consistance + algorithmes dédiés)
  • 12. 12/17 Quelques résultats expérimentaux  Application – Ptidej  Détection sur plusieurs frameworks : – java.awt.* – JHotDraw – JUnit – PatternsBox – Ptidej
  • 13. 13/17 Détection java.awt.* 121 1 1 1 JHotDraw 155 1 1 0,3 JUnit 34 1 1 0,4 JEdit 248 1,4 PatternsBox 52 0,3 java.aw t.* 121 0,2 JHotDraw 155 1 3 2 0,4 JUnit 34 1 1 0,2 JEdit 248 0,4 PatternsBox 52 0,3 java.aw t.* 121 3 1,1 JHotDraw 155 2 2 1 1 0,5 JUnit 34 JEdit 248 0,1 PatternsBox 52 0,2 java.aw t.* 121 JHotDraw 155 3 3 0,1 JUnit 34 JEdit 248 1 1 0,1 PatternsBox 52 java.aw t.* 121 3,4 JHotDraw 155 2 2 3,2 JUnit 34 4 4 2,5 JEdit 248 3 3 13 PatternsBox 52 1 1 2,8 java.aw t.* 121 3 3 0,7 JHotDraw 155 2 2 0,5 JUnit 34 0,4 JEdit 248 1 PatternsBox 52 1 1 0,5 610 29 28 2 3 5,8 Iterator NOC Composite Decorator Factory Method Existing Observer Singleton Détection dans PatternsBox Hits Missed False hits Time (sec.) Design patterns Frameworks
  • 14. 14/17 Réalisation de l’objectif  Décrire, appliquer et détecter les design patterns – Entités de première classe manipulables  Nous avons un assistant aidant : – L’implémentation – La détection et la documentation de formes exactes de design patterns (Cet assistant est « relativement » simple)
  • 15. 15/17 Questions ouvertes 1/3  Par rapport au contexte : Améliorer la qualité des développements par objets en favorisant l’utilisation des design patterns
  • 16. 16/17 Questions ouvertes 2/3  Formalisation : – Un unique méta-modèle est-il suffisant ? – Comment représenter les compromis ?  Application : – Comment bien décrire le code source ? – Est-ce qu’elle est toujours possible et intéressante ?
  • 17. 17/17 Questions ouvertes 3/3  Compréhension : – Est-il possible de détecter les formes exactes de n’importe quel design pattern ? – Est-il possible de détecter les formes approchées de n’importe quel design pattern ?