SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
Using Design Patterns and Constraints to
Automate the Detection and Correction
     of Inter-class Design Defects


       Yann-Gaël Guéhéneuc (guehene@emn.fr)
          Hervé Albin-Amiot (albin@emn.fr)



                École des Mines de Nantes, France

   Object Technology
                                              Soft-Maint S.A., France
   International Inc., Canada
Design patterns



       Constraints                   Inter-class
                                   design defects

                   The Ptidej tool
       To assess / to increase software
2/25
        flexibility and understandability
Summary

       n An overview of software quality
       n A classification of design defects
       n On inter-class design defects
       n Design pattern modeling
       n Design defects detection
       n Design defects correction
       n Case studies
       n Conclusion and future work
3/25
An overview of software quality

       n Viewpoints
         – ISO/IEC 9126
           • Functionality, reliability, usability, efficiency,
             maintainability, portability
         – ISO/IEC 14598
         – Coupling, cohesion, method replacement…
       n Maintenance = 75%
       n Design defects
4/25
A classification of design defects

       n Intra-class   / Inter-class / Behavioral




                                     Number: 39/61 (64%)
                                     Detection–correction: 25%




                                     Number: 13/61 (21%)
5/25                                 Detection–correction: 8%
On inter-class design defects 1/2

       n Design   patterns
         – [Gamma et al. 1994]
           • Quality architectural solutions
           • Language independent
              – General Smalltalk- or C++-level
           • Domain independent
           • Flexibility, understandability
         – Other authors

6/25
On inter-class design defects 2/2

       n Wanted   software quality characteristics
         – Flexibility
         – Understandability
       n Hypotheses
         – Groups of entities similar to a design
           pattern = Inter-class design defects
         – Making these groups of entities closer to a
           design pattern = Improving architectural
7/25
           quality (flexibility and understandability)
Design pattern modeling                     1/3

       n Meta-model
         – Describe the entities and elements in
           design pattern abstract models
       n Abstract   model
         – Describe a design pattern in term of roles
       n Concrete   model
         – Link an abstract model to real code

8/25
ic
       A Bas xample : Meta-model 2/3
            E




9/25
ic
        A Bas xample : Composite                                  3/3
             E
         Informal descriptions
         from [Gamma et al.]



                                              Instance of class Pattern
                   Translates into
                                              Instance of class PInterface
                                              Instance of class PClass
                                              Instance of class PAssoc
                                              Instance of class PDelegation
                                     name() Instance of class PMethod
                                     Pattern, PInterface, PClass, PAssoc,
10/25                                PDelegation, and PMethod are
                                     classes defined in our meta-model
Design pattern detection                        1/4

        n Design   pattern abstract model
          – Detection rules, i.e., constraints
             • Roles as variables
             • Relationships as constraints among variables


        n CSP
          – Source code for domain
          – Abstract model for variables, constraints
11/25
ic
         A Bas xample : Composite                                                                      2/4
              E


               Source code 1                 Composite pattern abstract model              Source code n




                  CSP                                                                         CSP


                                                    Distorted
                                                    concrete
                                                     models
12/25
        Composite pattern concrete model 1                                      Composite pattern concrete model n
Design pattern detection                     3/4

        n Distorted   concrete models
          – The design pattern
          – Not quite
             • Some constraints are not verified


        n Back   to our hypotheses
          – Groups of entities similar to a design
            pattern
13/25
Design pattern detection                      4/4

        n Explanation-based
                          Constraint
         Programming [Jussien]
          – Set of constraints justifying an action
            performed by the PaLM solver
             • Value removal
             • Contradiction
          – Strong interactivity with the user through
            dynamic removal / addition of constraints

14/25
Inter-class design defects           1/5

        n The   Ptidej tool
          – Hypotheses
          – Design pattern abstract models
          – Design pattern concrete models
          – Inter-class design defects
            • Detection
            • Correction


15/25
ic
        A Bas xample : Ptidej   2/5
             E




16/25
ic
        A Bas xample : Ptidej   3/5
             E




17/25
ic
        A Bas xample : Ptidej   4/5
             E




18/25
ic
        A Bas xample : Ptidej   5/5
             E




19/25
Case studies                              1/4

        n Several   applications being reviewed
          – Small test-cases
          – HotJava v3.0 (~90 classes)
          – JEdit v3.1 (~250 classes)
          – JHotDraw v5.1 (~155 classes)
          – JUnit v3.2 (~90 classes)



20/25
Case studies   2/4




21/25
Case studies   3/4




22/25
Case studies   4/4




23/25
Conclusion and future work

        n Design   patterns + Constraints +
                         Inter-class design defects
          – To assess / to increase software flexibility
            and understandability


        n Semantics, scalability, software quality
         characteristics, automation, interaction,
         weights, noise, hybrid
24/25
Thank you for your attention



                                    Questions?

                                    Comments?

        École des Mines de Nantes
                                               Yann-Gaël Guéhéneuc (guehene@emn.fr)
        Object Technology International Inc.
25/25                                                Hervé Albin-Amiot (albin@emn.fr)
        Soft-Maint S.A.

Mais conteúdo relacionado

Mais procurados

On the evolutionary nature of architectural violations - WCRE 2012
On the evolutionary nature of architectural violations - WCRE 2012On the evolutionary nature of architectural violations - WCRE 2012
On the evolutionary nature of architectural violations - WCRE 2012
João Brunet
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3
Akshay Nagpurkar
 
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissuesPal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
Mustafa Jarrar
 
Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-
Krishna Sai
 

Mais procurados (9)

Mark c# overview
Mark   c# overviewMark   c# overview
Mark c# overview
 
FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...
FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...
FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...
 
On the evolutionary nature of architectural violations - WCRE 2012
On the evolutionary nature of architectural violations - WCRE 2012On the evolutionary nature of architectural violations - WCRE 2012
On the evolutionary nature of architectural violations - WCRE 2012
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3
 
Project P
Project PProject P
Project P
 
Lesson 2 Line Weight Drawing Examples
Lesson 2 Line Weight Drawing ExamplesLesson 2 Line Weight Drawing Examples
Lesson 2 Line Weight Drawing Examples
 
Domain Specific Language with pleasure
Domain Specific Language with pleasureDomain Specific Language with pleasure
Domain Specific Language with pleasure
 
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissuesPal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
Pal gov.tutorial1.session7 2.finalcheckandschemaengineeringissues
 
Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-
 

Destaque

Successful marketing for events
Successful marketing for eventsSuccessful marketing for events
Successful marketing for events
Gita Cipta
 
50 states ss
50 states ss50 states ss
50 states ss
shabazz2
 
Television y menores
Television y menoresTelevision y menores
Television y menores
sara93npk
 
Zend framework 2.0
Zend framework 2.0Zend framework 2.0
Zend framework 2.0
shrutisgupta
 

Destaque (20)

130321 zephyrin soh - on the effect of exploration strategies on maintenanc...
130321   zephyrin soh - on the effect of exploration strategies on maintenanc...130321   zephyrin soh - on the effect of exploration strategies on maintenanc...
130321 zephyrin soh - on the effect of exploration strategies on maintenanc...
 
130411 francis palma - detection of process antipatterns -- a bpel perspective
130411   francis palma - detection of process antipatterns -- a bpel perspective130411   francis palma - detection of process antipatterns -- a bpel perspective
130411 francis palma - detection of process antipatterns -- a bpel perspective
 
Successful marketing for events
Successful marketing for eventsSuccessful marketing for events
Successful marketing for events
 
130830 stephane bunod - impact of code ownership on antipatterns
130830   stephane bunod - impact of code ownership on antipatterns130830   stephane bunod - impact of code ownership on antipatterns
130830 stephane bunod - impact of code ownership on antipatterns
 
130919 jim cordy - when is a clone not a clone
130919   jim cordy - when is a clone not a clone130919   jim cordy - when is a clone not a clone
130919 jim cordy - when is a clone not a clone
 
Content marketing trends 2014
Content marketing trends 2014Content marketing trends 2014
Content marketing trends 2014
 
How to Use Hootsuite
How to Use HootsuiteHow to Use Hootsuite
How to Use Hootsuite
 
50 states ss
50 states ss50 states ss
50 states ss
 
Tigran Mansuryani masin
Tigran Mansuryani masinTigran Mansuryani masin
Tigran Mansuryani masin
 
Careers in astronomy
Careers in astronomyCareers in astronomy
Careers in astronomy
 
NTP presentasjon Buskerud
NTP presentasjon BuskerudNTP presentasjon Buskerud
NTP presentasjon Buskerud
 
Seminario 6
Seminario 6Seminario 6
Seminario 6
 
WCRE04.ppt
WCRE04.pptWCRE04.ppt
WCRE04.ppt
 
Cuestionario visita a sevilla promece Sevilla
Cuestionario visita a sevilla promece   SevillaCuestionario visita a sevilla promece   Sevilla
Cuestionario visita a sevilla promece Sevilla
 
Textos definitivos punto 11
Textos definitivos punto 11Textos definitivos punto 11
Textos definitivos punto 11
 
Careers in audio sound engineering
Careers in audio sound engineeringCareers in audio sound engineering
Careers in audio sound engineering
 
SSBSE11b.ppt
SSBSE11b.pptSSBSE11b.ppt
SSBSE11b.ppt
 
Television y menores
Television y menoresTelevision y menores
Television y menores
 
Zend framework 2.0
Zend framework 2.0Zend framework 2.0
Zend framework 2.0
 
SCO Pilot Project Efforts to Integrate County PLSS Datasets - Timothy Kennedy
SCO Pilot Project Efforts to Integrate County PLSS Datasets - Timothy KennedySCO Pilot Project Efforts to Integrate County PLSS Datasets - Timothy Kennedy
SCO Pilot Project Efforts to Integrate County PLSS Datasets - Timothy Kennedy
 

Semelhante a TOOLS USA01.ppt

ECOOP05 QAOOSEb.ppt
ECOOP05 QAOOSEb.pptECOOP05 QAOOSEb.ppt
ECOOP05 QAOOSEb.ppt
Ptidej Team
 
IJCAI01 MSPC.ppt
IJCAI01 MSPC.pptIJCAI01 MSPC.ppt
IJCAI01 MSPC.ppt
Ptidej Team
 
ECOOP05 WOORa.ppt
ECOOP05 WOORa.pptECOOP05 WOORa.ppt
ECOOP05 WOORa.ppt
Ptidej Team
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdf
B.T.L.I.T
 
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.pptECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
Ptidej Team
 
ECOOP05 BSUP.ppt
ECOOP05 BSUP.pptECOOP05 BSUP.ppt
ECOOP05 BSUP.ppt
Ptidej Team
 
Ch03-Software Engineering Model
Ch03-Software Engineering ModelCh03-Software Engineering Model
Ch03-Software Engineering Model
Bala Ganesh
 

Semelhante a TOOLS USA01.ppt (20)

Toolsusa01.ppt
Toolsusa01.pptToolsusa01.ppt
Toolsusa01.ppt
 
ECOOP05 QAOOSEb.ppt
ECOOP05 QAOOSEb.pptECOOP05 QAOOSEb.ppt
ECOOP05 QAOOSEb.ppt
 
IJCAI01 MSPC.ppt
IJCAI01 MSPC.pptIJCAI01 MSPC.ppt
IJCAI01 MSPC.ppt
 
Ase02 dmp.ppt
Ase02 dmp.pptAse02 dmp.ppt
Ase02 dmp.ppt
 
Ijcai01 mspc.ppt
Ijcai01 mspc.pptIjcai01 mspc.ppt
Ijcai01 mspc.ppt
 
ECOOP05 WOORa.ppt
ECOOP05 WOORa.pptECOOP05 WOORa.ppt
ECOOP05 WOORa.ppt
 
Google lme4
Google lme4Google lme4
Google lme4
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdf
 
ECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.pptECOOP01 PhDOOS.ppt
ECOOP01 PhDOOS.ppt
 
MDE in Practice
MDE in PracticeMDE in Practice
MDE in Practice
 
010821+presentation+oti.ppt
010821+presentation+oti.ppt010821+presentation+oti.ppt
010821+presentation+oti.ppt
 
ECOOP05 BSUP.ppt
ECOOP05 BSUP.pptECOOP05 BSUP.ppt
ECOOP05 BSUP.ppt
 
Ecoop05 bsup.ppt
Ecoop05 bsup.pptEcoop05 bsup.ppt
Ecoop05 bsup.ppt
 
CSMR06b.ppt
CSMR06b.pptCSMR06b.ppt
CSMR06b.ppt
 
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
 
Sw Software Design
Sw Software DesignSw Software Design
Sw Software Design
 
COMPSAC 2008 Presentation
COMPSAC 2008 PresentationCOMPSAC 2008 Presentation
COMPSAC 2008 Presentation
 
130924 yann-gael gueheneuc - an overview of software code quality and conne...
130924   yann-gael gueheneuc - an overview of software code quality and conne...130924   yann-gael gueheneuc - an overview of software code quality and conne...
130924 yann-gael gueheneuc - an overview of software code quality and conne...
 
Ch03-Software Engineering Model
Ch03-Software Engineering ModelCh03-Software Engineering Model
Ch03-Software Engineering Model
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 

Mais de Ptidej Team

Mais de Ptidej Team (20)

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software Miniaturisation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel Briand
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel Abdellatif
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh Kermansaravi
 
Mouna Abidi
Mouna AbidiMouna Abidi
Mouna Abidi
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel Grichi
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano Politowski
 
Will io t trigger the next software crisis
Will io t trigger the next software crisisWill io t trigger the next software crisis
Will io t trigger the next software crisis
 
MIPA
MIPAMIPA
MIPA
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.ppt
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.ppt
 
Medicine15.ppt
Medicine15.pptMedicine15.ppt
Medicine15.ppt
 
Qrs17b.ppt
Qrs17b.pptQrs17b.ppt
Qrs17b.ppt
 
Icpc11c.ppt
Icpc11c.pptIcpc11c.ppt
Icpc11c.ppt
 
Icsme16.ppt
Icsme16.pptIcsme16.ppt
Icsme16.ppt
 
Msr17a.ppt
Msr17a.pptMsr17a.ppt
Msr17a.ppt
 
Icsoc15.ppt
Icsoc15.pptIcsoc15.ppt
Icsoc15.ppt
 

Último

Último (20)

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

TOOLS USA01.ppt

  • 1. Using Design Patterns and Constraints to Automate the Detection and Correction of Inter-class Design Defects Yann-Gaël Guéhéneuc (guehene@emn.fr) Hervé Albin-Amiot (albin@emn.fr) École des Mines de Nantes, France Object Technology Soft-Maint S.A., France International Inc., Canada
  • 2. Design patterns Constraints Inter-class design defects The Ptidej tool To assess / to increase software 2/25 flexibility and understandability
  • 3. Summary n An overview of software quality n A classification of design defects n On inter-class design defects n Design pattern modeling n Design defects detection n Design defects correction n Case studies n Conclusion and future work 3/25
  • 4. An overview of software quality n Viewpoints – ISO/IEC 9126 • Functionality, reliability, usability, efficiency, maintainability, portability – ISO/IEC 14598 – Coupling, cohesion, method replacement… n Maintenance = 75% n Design defects 4/25
  • 5. A classification of design defects n Intra-class / Inter-class / Behavioral Number: 39/61 (64%) Detection–correction: 25% Number: 13/61 (21%) 5/25 Detection–correction: 8%
  • 6. On inter-class design defects 1/2 n Design patterns – [Gamma et al. 1994] • Quality architectural solutions • Language independent – General Smalltalk- or C++-level • Domain independent • Flexibility, understandability – Other authors 6/25
  • 7. On inter-class design defects 2/2 n Wanted software quality characteristics – Flexibility – Understandability n Hypotheses – Groups of entities similar to a design pattern = Inter-class design defects – Making these groups of entities closer to a design pattern = Improving architectural 7/25 quality (flexibility and understandability)
  • 8. Design pattern modeling 1/3 n Meta-model – Describe the entities and elements in design pattern abstract models n Abstract model – Describe a design pattern in term of roles n Concrete model – Link an abstract model to real code 8/25
  • 9. ic A Bas xample : Meta-model 2/3 E 9/25
  • 10. ic A Bas xample : Composite 3/3 E Informal descriptions from [Gamma et al.] Instance of class Pattern Translates into Instance of class PInterface Instance of class PClass Instance of class PAssoc Instance of class PDelegation name() Instance of class PMethod Pattern, PInterface, PClass, PAssoc, 10/25 PDelegation, and PMethod are classes defined in our meta-model
  • 11. Design pattern detection 1/4 n Design pattern abstract model – Detection rules, i.e., constraints • Roles as variables • Relationships as constraints among variables n CSP – Source code for domain – Abstract model for variables, constraints 11/25
  • 12. ic A Bas xample : Composite 2/4 E Source code 1 Composite pattern abstract model Source code n CSP CSP Distorted concrete models 12/25 Composite pattern concrete model 1 Composite pattern concrete model n
  • 13. Design pattern detection 3/4 n Distorted concrete models – The design pattern – Not quite • Some constraints are not verified n Back to our hypotheses – Groups of entities similar to a design pattern 13/25
  • 14. Design pattern detection 4/4 n Explanation-based Constraint Programming [Jussien] – Set of constraints justifying an action performed by the PaLM solver • Value removal • Contradiction – Strong interactivity with the user through dynamic removal / addition of constraints 14/25
  • 15. Inter-class design defects 1/5 n The Ptidej tool – Hypotheses – Design pattern abstract models – Design pattern concrete models – Inter-class design defects • Detection • Correction 15/25
  • 16. ic A Bas xample : Ptidej 2/5 E 16/25
  • 17. ic A Bas xample : Ptidej 3/5 E 17/25
  • 18. ic A Bas xample : Ptidej 4/5 E 18/25
  • 19. ic A Bas xample : Ptidej 5/5 E 19/25
  • 20. Case studies 1/4 n Several applications being reviewed – Small test-cases – HotJava v3.0 (~90 classes) – JEdit v3.1 (~250 classes) – JHotDraw v5.1 (~155 classes) – JUnit v3.2 (~90 classes) 20/25
  • 21. Case studies 2/4 21/25
  • 22. Case studies 3/4 22/25
  • 23. Case studies 4/4 23/25
  • 24. Conclusion and future work n Design patterns + Constraints + Inter-class design defects – To assess / to increase software flexibility and understandability n Semantics, scalability, software quality characteristics, automation, interaction, weights, noise, hybrid 24/25
  • 25. Thank you for your attention Questions? Comments? École des Mines de Nantes Yann-Gaël Guéhéneuc (guehene@emn.fr) Object Technology International Inc. 25/25 Hervé Albin-Amiot (albin@emn.fr) Soft-Maint S.A.