SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Instantiating and
            Detecting Design Patterns:
          Putting Bits and Pieces Together

                     Hervé Albin-Amiot (albin@emn.fr)
                      Pierre Cointe (cointe@emn.fr)
                  Yann-Gaël Guéhéneuc (guehene@emn.fr)
                    Narendra Jussien (jussien@emn.fr)



                      École des Mines de Nantes, France
         Object Technology
                                                         Soft-Maint S.A., France
         International Inc., Canada



Welcome
My name is…
And this is…
We are PhD students at the EMN.
Today, I come to talk about design pattern application and detection.




                                                                                   1
Highlights
          n Context
          n Goal
          n Solution:
               –   Related works
               –   Architecture
               –   Experimentations
               –   Limitations
          n Open        questions
  2/19




Today’s presentation follows this plan:
Context = Software engineering (obviously)
Goal = To automate design pattern application and detection, to help
implementing, understanding, and re-engineering software systems.


We propose our solution.
We position ourselves relatively to the literature.
Then…
We finish with open questions, still unanswered.




                                                                       2
Context

         n What?
             – To improve OO software systems quality
         n How?
             – In helping OO software practitioners in:
                  • Implementing their design
                  • Understanding their software systems
                  • Re-engineering their software systems


 3/19




Read the slide…




                                                            3
Goal

          n To    provide two assistants to help in:
              – Implementing the design:
                  • Applying design patterns
              – Understanding:
                  • Detecting complete versions of design patterns
              – Re-engineering:
                  • Detecting distorted versions of design patterns
                  • Transforming source code
          n Assistants            must be simple and efficient
  4/19




We want to automate the design patterns for the implementation phase, at the
source code level.
We do not work on the requirements or design phases.


Assistants must be kept simple.
Let’s take a word-processor:
              Example with a wizard to make letter:
                              This wizard must not be bigger or more complex
than the word-processor itself !!!




                                                                               4
Our solution

          n Round-trip   based on a common
             formalization of the design patterns




  5/19




Concept of round-trip in OUR case = Common design pattern
description/formalization:
-To apply design patterns
-To detect design patterns




                                                            5
Related works

          n Formalization:
               – Eden 2000, Florijn et al. 1997
          n Application:
               – Budinsky et al. 1996, Eden et al. 1997
          n Detection:
               – Wuyts 1998, Antoniol et al. 1998


  6/19




Basically, our work is related to…
However, it is difficult to position ourselves because we treat the three aspects
together rather than…
Also, language approaches, based on language extensions, exist but we are not
interested because we want to use a standard object-oriented programming
language.




                                                                                    6
Our two assistants

          n PatternsBox:
              – To implement the design:
                  • To apply design patterns
              – To understand:
                  • To detect complete versions of design patterns
          n Ptidej:
              – To understand and to re-engineer:
                  • To detect distorted versions of design patterns
                  • To transform source code

  7/19




Our solution is made of two assistants.




                                                                      7
Architecture

         n PDL                                    :
                     (Pattern Description Language)

              – A meta-model for design pattern
                formalization
         n JavaXL         (Java eXtended Language)    :
              – A Java source transformation engine
         n PaLM                                           :
                       (Propagation and Learning with Move)

              – An explanation-based constraint solver

  8/19




Those two assistants are based on three components…
PDL = Design pattern descriptions.




                                                              8
Uses
                                                                         Produces
          Architecture
                                                            Design pattern
                                        PDL
                                                            implementor


          Source code description               Design pattern descriptions



                                   PatternsBox

                                                   Detected design patterns
          Recognizer (PDL)                          (complete versions)

  9/19                            Java source code


On one hand…
PatternsBox detects complete versions of of design patterns using arc-
consistency or specific and language-dependent detection algorithms.
PatternsBox is open enough to accept any customized detection algorithm to
improve design pattern detection.




                                                                                    9
Uses
                                                                Produces
         Architecture
                                                      Design pattern
                                   PDL
                                                      implementor


         Source code description            Design pattern descriptions


                                   Ptidej                 PaLM


         Recognizer (PDL)      JavaXL           Detected design patterns
                                                  (distorted versions)

 10/19                      Java source code


On the other hand…




                                                                           10
Example of PatternsBox
                                                            <<interface>>
                                                           PrimitiveFactory
                                                           (from jtu.ui.primitive)


                                  createAggregationSymbol(Point, Dimension,int ) : AggregationSymbol
                                  createArrowSymbol (Point, Dimension, int) : ArrowSymbol
                                  ...

                                                                                                                                 <<interface>>
                                                                                                                                   Primitive
                                                           PrimitiveFactory                                                 (from jtu.ui.primitive )
                                                         (from jtu.ui.primitive.awt)

                                                                                                                    getDestination () : Point
                                  createAggregationSymbol(Point, Dimension,int ) : AggregationSymbol                isNameShowable() : boolean
                                  createArrowSymbol (Point, Dimension, int) : ArrowSymbol                           setDimension(Dimension) : void
                                  ...                                                                               setPosition (Point) : void




                                                                    Primitive
                                                             (from jtu.ui.primitive.awt )            <<interface>>                          <<interface>>
                                                                                                                                                                      ...
                                                                                                   AggregationSymbol                        ArrowSymbol
                                                        getDestination () : Point                      (from jtu.ui.primitive)            (from jtu.ui.primitive)
                                                        isNameShowable() : boolean
                                                        setDimension(Dimension) : void
                                                        setPosition(Point) : void

                                                                                                   AggregationSymbol                         ArrowSymbol
                                                                                                  (from jtu.ui.primitive.awt)           (from jtu.ui.primitive.awt)




 11/19




We presented our two assistants and their architecture.
We present now some experimentations.
However, it is difficult to show usage experimentations, because it is hard on
slides to show you how tools work.


Here is an example of how we applied the design pattern Abstract Factory.
This is a real case used in Ptidej…
Here, we present the instantiation window if the Abstract Factory design
pattern...




                                                                                                                                                                            11
Example of Ptidej
                                                                                                                        <<interface>>
                                                                                                                          Primitive
                          Canvas                                       Canvas
                  (from jtu.ui.awt.primitive)                    (fromjtu.ui.primitive)                            (from jtu.ui.primitive)


              getCanvas() : Canvas                        addPrimitive(Primitive) : void                    getDestination() : Point
                                                                                                            isNameShowable() : boolean
              ...                                         removePrimtive(int) : Primitive
                                                                                                            setDimension(Dimension) : void
                                                                                                            setPosition(Point) : void




                                                           Primitive
                                                    (from jtu.ui.primitive.awt)               <<interface>>                        <<interface>>             ...
                                                                                            AggregationSymbol                      ArrowSymbol
                                                getDestination() : Point                      (from jtu.ui.primitive)            (from jtu.ui.primitive)
                                                isNameShowable() : boolean
                                                setDimension(Dimension) : void
                                                setPosition(Point) : void

                                                                                            AggregationSymbol                      ArrowSymbol
                                                                                            (from jtu.ui.primitive.awt)        (from jtu.ui.primitive.awt)




 12/19




Here, you have another related part of the Ptidej architecture.
Briefly, the Abstract Factory creates widgets that are aggregated into a Canvas,
and Ptidej…
We used Ptidej to re-engineer its own architecture…


Now, we are going to show you some results on the understanding and re-
engineering parts of our assistants.




                                                                                                                                                                   12
Results
                                                  Understanding (PatternsBox)          Reengineering (Ptidej)
          Design
                     Frameworks NOC Existing                             Time        Complete         Distorted Time
          patterns                                Hits Missed False hits
                                                                        (sec.) Hits Missed False hits   Hits    (sec.)
                     java.awt.*        121   1     1                        1    1                         7     82,6

                                       155   1     1                       0,3   1                         3     65,5
                     JHotDraw
         Composite        JUnit        34    1           1                 0,4   1                         7     22,9

                                       248                                 1,4                                   29,5
                          JEdit
                   PatternsBox         52                                  0,3                             3     40,3
                          java.awt.*   121                                 0,2                  1          7     82,6
                           JHotDraw    155   1     3               2       0,4   1                         3     65,5
         Decorator             JUnit   34    1     1                       0,2   1                         7     22,9
                               JEdit   248                                 0,4                                   29,5
                         PatternsBox   52                                  0,3                             3     40,3
                          java.awt.*   121   3                             1,1   3              8          1      7
                           JHotDraw    155   2     2     1         1       0,5   2              37         1     103,7
          Factory              JUnit   34                                                       1          1      23
          Method               JEdit   248                                 0,1                             6     29,7
                         PatternsBox   52                                  0,2                  7          1     13,5
                          java.awt.*   121                                                      12               75,6
                           JHotDraw    155   3     3                       0,1         3       100               231,1
          Iterator             JUnit   34                                                       8                22,7
                               JEdit   248   1     1                       0,1                  1                28,5
                         PatternsBox   52                                                       79               36,5
                          java.awt.*   121                                 3,4   4              4                73,5
                           JHotDraw    155   2     2                       3,2   2     2        2                61,4
         Observer              JUnit   34    4     4                       2,5                                   19,9
                               JEdit   248   3     3                       13          3                         27,8
                         PatternsBox   52    1     1                       2,8   2     1        2                31,5
                          java.awt.*   121   3     3                       0,7
                           JHotDraw    155   2     2                       0,5
         Singleton             JUnit   34                                  0,4                       N/A
                               JEdit   248                                  1
 13/19                   PatternsBox   52    1     1                       0,5

                                       610   29   28     2        3        1,3   18   9       262          50   50,7




In the following table, we apply our detection mechanism to different
frameworks…
Namely…
And the design patterns… WHICH ARE COMMON.


Our understanding tool is fast and accurate, thanks to its speci ic and language-
                                                               f
dependent algorithms.
Our re-engineering tool is slower and less accurate but provide useful
information on distorted design patterns, and helps efficiently in re-engineering
tools, like we showed in the previous experimentations…


Very useful…
Requires design knowledge…


The summary is that among the 5 frameworks, 610 classes, but only 29 instances
of those 6 very common design patterns.
Drawbacks = 610 classes, 12 design patterns in JHotDraw…




                                                                                                                         13
Current limitations

          n PatternsBox   does not transform source
            code, it only generates skeletons
          n Ptidej is slow and not accurate enough


          n Only      for Java



 14/19




We presented our two assistants and real-life experimentations but the tools
have…




                                                                               14
Open questions

        n Formalization:
          – Is a unique meta-model sufficient to
            formalize design patterns?
          – How to represent trade-offs?


        n Application:
          – How to represent usefully source code?
          – Is source transformation possible and
15/19       interesting for any design pattern?




                                                     15
Open questions

        n Understanding:
          – Is it possible to detect complete versions of
            any design pattern?
          – Is it better:
            • To use a common formalization to detect
              complete versions of design patterns?
            • To use specific algorithms?
            • To mix both approaches?

16/19




                                                            16
Open questions
        n Re-engineering:
          – How to distinguish a distorted design
            pattern from a non-design pattern micro-
            architecture?
          – How to present the interesting pieces of
            information on distorted versions of design
            patterns?


17/19




                                                          17
Future

          n Complete            catalogue of design patterns:
              – More frameworks
              – Detection of complete versions
              – Detection of distorted versions


          n More         on design pattern application:
              – Source transformation

 18/19




We propose a set of tools to:
-Apply design patterns
-Detect complete and distorted design patterns micro-architectures
-Correct design defect
These tools work, are useful but have some limitations…




                                                                     18
Thank you for your attention



                                     Questions?

                                    Comments?

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




                                                                                          19

Contenu connexe

Similaire à ASE01.ppt

Hire a Machine to Code - Michael Arthur Bucko & Aurélien Nicolas
Hire a Machine to Code - Michael Arthur Bucko & Aurélien NicolasHire a Machine to Code - Michael Arthur Bucko & Aurélien Nicolas
Hire a Machine to Code - Michael Arthur Bucko & Aurélien NicolasWithTheBest
 
End-to-End Deep Learning Deployment with ONNX
End-to-End Deep Learning Deployment with ONNXEnd-to-End Deep Learning Deployment with ONNX
End-to-End Deep Learning Deployment with ONNXNick Pentreath
 
Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and EvolutionEelco Visser
 
ECOOP05 BSUP.ppt
ECOOP05 BSUP.pptECOOP05 BSUP.ppt
ECOOP05 BSUP.pptPtidej Team
 
The Language of Application Architecture
The Language of Application ArchitectureThe Language of Application Architecture
The Language of Application ArchitectureBrad Beiermann
 
Software Architecture Erosion and Modernization
Software Architecture Erosion and ModernizationSoftware Architecture Erosion and Modernization
Software Architecture Erosion and Modernizationbmerkle
 
EclipseConEurope2012 SOA - Models As Operational Documentation
EclipseConEurope2012 SOA - Models As Operational DocumentationEclipseConEurope2012 SOA - Models As Operational Documentation
EclipseConEurope2012 SOA - Models As Operational DocumentationMarc Dutoo
 
Deploying End-to-End Deep Learning Pipelines with ONNX
Deploying End-to-End Deep Learning Pipelines with ONNXDeploying End-to-End Deep Learning Pipelines with ONNX
Deploying End-to-End Deep Learning Pipelines with ONNXDatabricks
 
How to Speak the Language of Application Architecture
How to Speak the Language of Application ArchitectureHow to Speak the Language of Application Architecture
How to Speak the Language of Application ArchitectureBrad Beiermann
 
Rhapsody reverseengineering
Rhapsody reverseengineeringRhapsody reverseengineering
Rhapsody reverseengineeringScott Althouse
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Jordi Cabot
 
Boost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In BanglaBoost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In BanglaStack Learner
 
Domain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachDomain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachPanagiotis Papaioannou
 
OpenMockup - Presentation apr/2016
OpenMockup - Presentation apr/2016OpenMockup - Presentation apr/2016
OpenMockup - Presentation apr/2016Xavi Montero
 
JS Fest 2019. Ryan Dahl. Deno, a new way to JavaScript
JS Fest 2019. Ryan Dahl. Deno, a new way to JavaScriptJS Fest 2019. Ryan Dahl. Deno, a new way to JavaScript
JS Fest 2019. Ryan Dahl. Deno, a new way to JavaScriptJSFestUA
 

Similaire à ASE01.ppt (20)

Ase01.ppt
Ase01.pptAse01.ppt
Ase01.ppt
 
010821+presentation+oti.ppt
010821+presentation+oti.ppt010821+presentation+oti.ppt
010821+presentation+oti.ppt
 
Hire a Machine to Code - Michael Arthur Bucko & Aurélien Nicolas
Hire a Machine to Code - Michael Arthur Bucko & Aurélien NicolasHire a Machine to Code - Michael Arthur Bucko & Aurélien Nicolas
Hire a Machine to Code - Michael Arthur Bucko & Aurélien Nicolas
 
End-to-End Deep Learning Deployment with ONNX
End-to-End Deep Learning Deployment with ONNXEnd-to-End Deep Learning Deployment with ONNX
End-to-End Deep Learning Deployment with ONNX
 
Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and Evolution
 
ECOOP05 BSUP.ppt
ECOOP05 BSUP.pptECOOP05 BSUP.ppt
ECOOP05 BSUP.ppt
 
The Language of Application Architecture
The Language of Application ArchitectureThe Language of Application Architecture
The Language of Application Architecture
 
Software Architecture Erosion and Modernization
Software Architecture Erosion and ModernizationSoftware Architecture Erosion and Modernization
Software Architecture Erosion and Modernization
 
EclipseConEurope2012 SOA - Models As Operational Documentation
EclipseConEurope2012 SOA - Models As Operational DocumentationEclipseConEurope2012 SOA - Models As Operational Documentation
EclipseConEurope2012 SOA - Models As Operational Documentation
 
Deploying End-to-End Deep Learning Pipelines with ONNX
Deploying End-to-End Deep Learning Pipelines with ONNXDeploying End-to-End Deep Learning Pipelines with ONNX
Deploying End-to-End Deep Learning Pipelines with ONNX
 
How to Speak the Language of Application Architecture
How to Speak the Language of Application ArchitectureHow to Speak the Language of Application Architecture
How to Speak the Language of Application Architecture
 
Rhapsody reverseengineering
Rhapsody reverseengineeringRhapsody reverseengineering
Rhapsody reverseengineering
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?
 
Simple design
Simple designSimple design
Simple design
 
Boost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In BanglaBoost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In Bangla
 
Domain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic ApproachDomain Driven Design: Made Easy employing Systemic Approach
Domain Driven Design: Made Easy employing Systemic Approach
 
Raising the Bar
Raising the BarRaising the Bar
Raising the Bar
 
OpenMockup - Presentation apr/2016
OpenMockup - Presentation apr/2016OpenMockup - Presentation apr/2016
OpenMockup - Presentation apr/2016
 
JS Fest 2019. Ryan Dahl. Deno, a new way to JavaScript
JS Fest 2019. Ryan Dahl. Deno, a new way to JavaScriptJS Fest 2019. Ryan Dahl. Deno, a new way to JavaScript
JS Fest 2019. Ryan Dahl. Deno, a new way to JavaScript
 
Acceleo Code Generation
Acceleo Code GenerationAcceleo Code Generation
Acceleo Code Generation
 

Plus de Ptidej Team

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software MiniaturisationPtidej Team
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel BriandPtidej Team
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel AbdellatifPtidej Team
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh KermansaraviPtidej Team
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel GrichiPtidej Team
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano PolitowskiPtidej Team
 
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 crisisPtidej Team
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptPtidej Team
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptPtidej Team
 

Plus 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
 

Dernier

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Dernier (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

ASE01.ppt

  • 1. Instantiating and Detecting Design Patterns: Putting Bits and Pieces Together Hervé Albin-Amiot (albin@emn.fr) Pierre Cointe (cointe@emn.fr) Yann-Gaël Guéhéneuc (guehene@emn.fr) Narendra Jussien (jussien@emn.fr) École des Mines de Nantes, France Object Technology Soft-Maint S.A., France International Inc., Canada Welcome My name is… And this is… We are PhD students at the EMN. Today, I come to talk about design pattern application and detection. 1
  • 2. Highlights n Context n Goal n Solution: – Related works – Architecture – Experimentations – Limitations n Open questions 2/19 Today’s presentation follows this plan: Context = Software engineering (obviously) Goal = To automate design pattern application and detection, to help implementing, understanding, and re-engineering software systems. We propose our solution. We position ourselves relatively to the literature. Then… We finish with open questions, still unanswered. 2
  • 3. Context n What? – To improve OO software systems quality n How? – In helping OO software practitioners in: • Implementing their design • Understanding their software systems • Re-engineering their software systems 3/19 Read the slide… 3
  • 4. Goal n To provide two assistants to help in: – Implementing the design: • Applying design patterns – Understanding: • Detecting complete versions of design patterns – Re-engineering: • Detecting distorted versions of design patterns • Transforming source code n Assistants must be simple and efficient 4/19 We want to automate the design patterns for the implementation phase, at the source code level. We do not work on the requirements or design phases. Assistants must be kept simple. Let’s take a word-processor: Example with a wizard to make letter: This wizard must not be bigger or more complex than the word-processor itself !!! 4
  • 5. Our solution n Round-trip based on a common formalization of the design patterns 5/19 Concept of round-trip in OUR case = Common design pattern description/formalization: -To apply design patterns -To detect design patterns 5
  • 6. Related works n Formalization: – Eden 2000, Florijn et al. 1997 n Application: – Budinsky et al. 1996, Eden et al. 1997 n Detection: – Wuyts 1998, Antoniol et al. 1998 6/19 Basically, our work is related to… However, it is difficult to position ourselves because we treat the three aspects together rather than… Also, language approaches, based on language extensions, exist but we are not interested because we want to use a standard object-oriented programming language. 6
  • 7. Our two assistants n PatternsBox: – To implement the design: • To apply design patterns – To understand: • To detect complete versions of design patterns n Ptidej: – To understand and to re-engineer: • To detect distorted versions of design patterns • To transform source code 7/19 Our solution is made of two assistants. 7
  • 8. Architecture n PDL : (Pattern Description Language) – A meta-model for design pattern formalization n JavaXL (Java eXtended Language) : – A Java source transformation engine n PaLM : (Propagation and Learning with Move) – An explanation-based constraint solver 8/19 Those two assistants are based on three components… PDL = Design pattern descriptions. 8
  • 9. Uses Produces Architecture Design pattern PDL implementor Source code description Design pattern descriptions PatternsBox Detected design patterns Recognizer (PDL) (complete versions) 9/19 Java source code On one hand… PatternsBox detects complete versions of of design patterns using arc- consistency or specific and language-dependent detection algorithms. PatternsBox is open enough to accept any customized detection algorithm to improve design pattern detection. 9
  • 10. Uses Produces Architecture Design pattern PDL implementor Source code description Design pattern descriptions Ptidej PaLM Recognizer (PDL) JavaXL Detected design patterns (distorted versions) 10/19 Java source code On the other hand… 10
  • 11. Example of PatternsBox <<interface>> PrimitiveFactory (from jtu.ui.primitive) createAggregationSymbol(Point, Dimension,int ) : AggregationSymbol createArrowSymbol (Point, Dimension, int) : ArrowSymbol ... <<interface>> Primitive PrimitiveFactory (from jtu.ui.primitive ) (from jtu.ui.primitive.awt) getDestination () : Point createAggregationSymbol(Point, Dimension,int ) : AggregationSymbol isNameShowable() : boolean createArrowSymbol (Point, Dimension, int) : ArrowSymbol setDimension(Dimension) : void ... setPosition (Point) : void Primitive (from jtu.ui.primitive.awt ) <<interface>> <<interface>> ... AggregationSymbol ArrowSymbol getDestination () : Point (from jtu.ui.primitive) (from jtu.ui.primitive) isNameShowable() : boolean setDimension(Dimension) : void setPosition(Point) : void AggregationSymbol ArrowSymbol (from jtu.ui.primitive.awt) (from jtu.ui.primitive.awt) 11/19 We presented our two assistants and their architecture. We present now some experimentations. However, it is difficult to show usage experimentations, because it is hard on slides to show you how tools work. Here is an example of how we applied the design pattern Abstract Factory. This is a real case used in Ptidej… Here, we present the instantiation window if the Abstract Factory design pattern... 11
  • 12. Example of Ptidej <<interface>> Primitive Canvas Canvas (from jtu.ui.awt.primitive) (fromjtu.ui.primitive) (from jtu.ui.primitive) getCanvas() : Canvas addPrimitive(Primitive) : void getDestination() : Point isNameShowable() : boolean ... removePrimtive(int) : Primitive setDimension(Dimension) : void setPosition(Point) : void Primitive (from jtu.ui.primitive.awt) <<interface>> <<interface>> ... AggregationSymbol ArrowSymbol getDestination() : Point (from jtu.ui.primitive) (from jtu.ui.primitive) isNameShowable() : boolean setDimension(Dimension) : void setPosition(Point) : void AggregationSymbol ArrowSymbol (from jtu.ui.primitive.awt) (from jtu.ui.primitive.awt) 12/19 Here, you have another related part of the Ptidej architecture. Briefly, the Abstract Factory creates widgets that are aggregated into a Canvas, and Ptidej… We used Ptidej to re-engineer its own architecture… Now, we are going to show you some results on the understanding and re- engineering parts of our assistants. 12
  • 13. Results Understanding (PatternsBox) Reengineering (Ptidej) Design Frameworks NOC Existing Time Complete Distorted Time patterns Hits Missed False hits (sec.) Hits Missed False hits Hits (sec.) java.awt.* 121 1 1 1 1 7 82,6 155 1 1 0,3 1 3 65,5 JHotDraw Composite JUnit 34 1 1 0,4 1 7 22,9 248 1,4 29,5 JEdit PatternsBox 52 0,3 3 40,3 java.awt.* 121 0,2 1 7 82,6 JHotDraw 155 1 3 2 0,4 1 3 65,5 Decorator JUnit 34 1 1 0,2 1 7 22,9 JEdit 248 0,4 29,5 PatternsBox 52 0,3 3 40,3 java.awt.* 121 3 1,1 3 8 1 7 JHotDraw 155 2 2 1 1 0,5 2 37 1 103,7 Factory JUnit 34 1 1 23 Method JEdit 248 0,1 6 29,7 PatternsBox 52 0,2 7 1 13,5 java.awt.* 121 12 75,6 JHotDraw 155 3 3 0,1 3 100 231,1 Iterator JUnit 34 8 22,7 JEdit 248 1 1 0,1 1 28,5 PatternsBox 52 79 36,5 java.awt.* 121 3,4 4 4 73,5 JHotDraw 155 2 2 3,2 2 2 2 61,4 Observer JUnit 34 4 4 2,5 19,9 JEdit 248 3 3 13 3 27,8 PatternsBox 52 1 1 2,8 2 1 2 31,5 java.awt.* 121 3 3 0,7 JHotDraw 155 2 2 0,5 Singleton JUnit 34 0,4 N/A JEdit 248 1 13/19 PatternsBox 52 1 1 0,5 610 29 28 2 3 1,3 18 9 262 50 50,7 In the following table, we apply our detection mechanism to different frameworks… Namely… And the design patterns… WHICH ARE COMMON. Our understanding tool is fast and accurate, thanks to its speci ic and language- f dependent algorithms. Our re-engineering tool is slower and less accurate but provide useful information on distorted design patterns, and helps efficiently in re-engineering tools, like we showed in the previous experimentations… Very useful… Requires design knowledge… The summary is that among the 5 frameworks, 610 classes, but only 29 instances of those 6 very common design patterns. Drawbacks = 610 classes, 12 design patterns in JHotDraw… 13
  • 14. Current limitations n PatternsBox does not transform source code, it only generates skeletons n Ptidej is slow and not accurate enough n Only for Java 14/19 We presented our two assistants and real-life experimentations but the tools have… 14
  • 15. Open questions n Formalization: – Is a unique meta-model sufficient to formalize design patterns? – How to represent trade-offs? n Application: – How to represent usefully source code? – Is source transformation possible and 15/19 interesting for any design pattern? 15
  • 16. Open questions n Understanding: – Is it possible to detect complete versions of any design pattern? – Is it better: • To use a common formalization to detect complete versions of design patterns? • To use specific algorithms? • To mix both approaches? 16/19 16
  • 17. Open questions n Re-engineering: – How to distinguish a distorted design pattern from a non-design pattern micro- architecture? – How to present the interesting pieces of information on distorted versions of design patterns? 17/19 17
  • 18. Future n Complete catalogue of design patterns: – More frameworks – Detection of complete versions – Detection of distorted versions n More on design pattern application: – Source transformation 18/19 We propose a set of tools to: -Apply design patterns -Detect complete and distorted design patterns micro-architectures -Correct design defect These tools work, are useful but have some limitations… 18
  • 19. Thank you for your attention Questions? Comments? Hervé Albin-Amiot (albin@emn.fr) École des Mines de Nantes Pierre Cointe (cointe@emn.fr) Object Technology International Inc . Yann-Gaël Guéhéneuc (guehene@emn.fr) 19/19 Soft-Maint S.A. Narendra Jussien (jussien@emn.fr) 19