SlideShare a Scribd company logo
1 of 33
Download to read offline
This presentation has been given at OOPSLA, the 27th of October 2004, in Vancouver, BC, Canada.




      Recovering Binary Class Relationships:
         Putting Icing on the UML Cake



                                               Yann-Gaël Guéhéneuc
                                                 Hervé Albin-Amiot

              Département d’informatique
              École des Mines de Nantes

              Software Engineering Laboratory
              Department of Computing Science and Operations Research
              University of Montreal                                                              © Yann-Gaël Guéhéneuc and Hervé Albin-Amiot
Statements

       n Maintenance
         – 50% of the total cost of a program


       n Program   understanding
         – 50% of the maintainers’ time


       n Anyhelp in understanding a program
        would reduce its cost!
2/32
Context

       n OO   maintenance
         – Source code
           • Most accurate source of information
         – Design models
           • Useful to understand source code
             (architecture of a program)
           • Non-existent or obsolete


       n Classdiagrams help in understanding
3/32    source code
Approach

       n Automated recovery of class diagrams
        from program source code
         – Extract relevant information
         – Operational semantics for relevant
           constituents of class diagram
         – Consistent mapping
           • Concepts in programming languages
           • Concepts in modeling languages

4/32
Problem

       n Use   of our approach on Java and UML
         – UML class diagrams
           • Only a notation! As emphasised during the
             panel on “Model Driven Architecture”
         – Mapping
           • Semantic continuity for some concepts, such as
             classes, fields, methods
           • Discontinuity for binary class relationships


5/32
Problem (cont’d)

                                                 Java




                          Should be recovered as




                               Is recovered as



6/32
Problem (cont’d)

                                                 Java




                          Should be recovered as




                               Is recovered as



6/32
Proposal

       n Studyof the reverse-engineering of
        binary class relationships
         – “Consensual” definitions
           • At design-level
           • At implementation-level
         – Properties
         – Formalisations
         – Recovery algorithms
7/32
Proposal (cont’d)

       n Studyof the reverse-engineering of
        binary class relationships
         – Mapping between programming and
           modeling languages
         – Sound foundations
           •   Understanding
           •   Round-tripping
           •   Design patterns identification
           •   … and much more!
8/32
Overview

       n Motivations
       n Formalisations
       n Recovery
       n Validations
       n Conclusion




9/32
Definitions

        n Up to now, no consensual definitions
        n Study of more than 30 definitions


        n “Consensual”               definitions
                         Link                                              Relationship




                                                  Is described by
          Origin        Means        Target                         Origin    Name        Target
         Instance       Direct      Instance                        Entity Association    Entity
         Instance       Field       Instance                        Class Aggregation     Entity
         Instance      Field +      Instance                        Class Composition     Entity
                  Lifetime property

         “Entity” denotes either a class or an interface
10/32
Definitions

        n Association
          – At design-level
            • Conceptual link between two classes
            • Multiple instances can be involved
          – At implementation-level
            • Message sends between instances of two
              classes, an origin and a target
            • Oriented, irreflexive, anti-symmetric at instance
              and class level; asymmetric at instance level
11/32
Definitions

        n Aggregation
          – At design-level
            • An aggregation relationship is an association
              between two classes: The whole and the part
          – At implementation level
            • An aggregation relationship exists between
              classes A and B when the definition of A, the
              whole, contains instances of B, its part


12/32
Definitions

        n Composition
          – At design-level
            • Aggregation where parts are destroyed when
              their whole is destroyed
            • Parts might be instantiated before the whole
              and exchanged
          – At implementation level
            • Aggregation with constraint on the lifetimes and
              on the ownership of the whole and of its part
13/32
Properties

        n Four   minimal properties


          – Exclusivity, an instance of B (b) is in
            relation with only one instance of A (a)
          – Invocation site, for method invocations
            from a to b
          – Lifetime, time of destruction of b wrt. a
14/32
          – Multiplicity, number of b’s for one a
Properties

        n Four   minimal properties
          – Exclusivity, EX(A, B) ∈

          – Invocation site, IS(A, B) ⊆ {field, parameter,
            local variable, …}

          – Lifetime, LT(A, B) ∈ {+, −}

          – Multiplicity, MU(A, B) ⊂ N ∪ {+∞}
15/32
Formalisations

        n Rewritingbinary class relationships as
         conjunctions of their properties

        n Association
            AS(A, B) =
              (EX(A, B) ∈ B) ∧ (EX(B, A) ∈ B) ∧
              (IS(A, B) ⊆ {field…}) ∧ (IS(B, A) = ∅) ∧
              (LT(A, B) ∈ {+, −}) ∧ (LT(B, A) ∈ {+, −}) ∧
              (MU(A, B) = [0, +∞]) ∧ (MU(B, A) = [0, +∞])
16/32
Formalisations

        n Aggregation
           AG(A, B) =
             (EX(A, B) ∈ B) ∧
             (EX(B, A) ∈ B) ∧
             (IS(A, B) ⊆ {field, array field, collection field}) ∧
             (IS(B, A) = ∅) ∧
             (LT(A, B) ∈ {+, −}) ∧
             (LT(B, A) ∈ {+, −}) ∧
             (MU(A, B) = [0, +∞]) ∧
17/32
             (MU(B, A) = [1, +∞])
Formalisations

        n Composition
           CO(A, B) =
             (EX(A, B) = true) ∧
             (EX(B, A) = false) ∧
             (IS(A, B) ⊆ {field, array field, collection field}) ∧
             (IS(B, A) = ∅) ∧
             (LT(A, B) = +) ∧
             (LT(B, A) = −) ∧
             (MU(A, B) = [1, +∞]) ∧
18/32
             (MU(B, A) = [1, 1])
Formalisations

        n Emergent    characteristics
          – Minimality of the set of properties
             • See p. 307 of the proceedings
          – Order among binary class relationships
             • Association
             • Aggregation
             • Composition
          – Static and dynamic parts
             • IS(A, B), MU(A, B)
19/32
             • EX(A, B), LT(A, B)
Overview

        n Motivations
        n Formalisations
        n Recovery
        n Validations
        n Conclusion




20/32
Recovery

        n Binary   class relationships
          – Not syntactical constructs in source code
          – Expressed with four minimal properties


        n Recovery
          – Computation of the properties
          – Inference of existing relationships

21/32
Recovery

        n Algorithms
          – Static analyses
            • IS(A, B), MU(A, B)
          – Dynamic analyses
            • EX(A, B), LT(A, B)




22/32
Recovery

        n Algorithms
          – Order among the relationships
          – Association
            • IS(A, B) with respect to other classes
          – Aggregation
            • MU(A, B) with respect to associated classes
          – Composition
            • EX(A, B)
                          with respect to aggregated classes
            • LT(A, B)
23/32
Overview

        n Motivations
        n Formalisations
        n Recovery
        n Validations
        n Conclusion




24/32
Model +
                                       Associations,
                                                            PDL / PADL
        Implementations                aggregations,
                                      and composition

                                          Caffeine
        n   Meta-model
                                          Model +
            – PDL / PADL                Associations,       PDL / PADL
                                        aggregations
        n   Static analyses
            – PatternsBox / Ptidej   PatternsBox / Ptidej

        n   Dynamic analyses               Model            PDL / PADL
            – Caffeine
                                      Dedicated parser



                                                             Bytecodes
25/32                                       Java
Experimentations

        n Case   studies
          – Java AWT v1.2.2
            • 367 classes
          – JHotDraw v5.1
            • 171 classes
          – JUnit v3.7
            • 45 classes


26/32
Experimentations
        n Association
          – 4,925 for 583 classes but required for aggregation
        n Aggregation
               Frameworks     Found   Manual False Hits
               Java AWT           17       20         1
               JHotDraw             6       8         0
               JUnit                1       4         0
               Total              24       32         1
               Recall: 0.75          Precision: 0.96

        n Composition
27/32
          – Precision and recall of 100% (JUnit only)
Experimentations

        n Emergent    characteristics
          – Quantitative
             • Possible metrics
          – Qualitative
             • Assessment
             • Comparison
          – Practicality


28/32
Overview

        n Motivations
        n Formalisations
        n Recovery
        n Validations
        n Conclusion




29/32
Conclusion

        n Any help in understanding a program
          would reduce its cost
        n Automated recovery of class diagrams
          from program source code
        n Mapping for binary class relationships
          – “Consensual” definitions
          – Formalisations
          – Recovery algorithms
30/32
Related work

        n Civello   at OOPSLA 1993

          – Classification of binary class relationships
          – No operational semantics
        n Henderson-Sellers          and Barbier in L’Objet 1999
          – Properties
          – Design-level
        n Jackson     and Waingold at ISCE 1999
          – Operational semantics
31/32
          – Flavours of association, aggregation only
Future work

        n Detection   of other UML constituents

        n Static   analyses vs. dynamic analyses

        n Experimental    validations
          – Maintainers
          – Class diagrams with/without binary
            class relationships
32/32

More Related Content

What's hot

Moving Cast Shadow Detection Using Physics-based Features (CVPR 2009)
Moving Cast Shadow Detection Using Physics-based Features (CVPR 2009)Moving Cast Shadow Detection Using Physics-based Features (CVPR 2009)
Moving Cast Shadow Detection Using Physics-based Features (CVPR 2009)Jia-Bin Huang
 
Knowledge Engineering rediscovered, Towards Reasoning Patterns for the Semant...
Knowledge Engineering rediscovered, Towards Reasoning Patterns for the Semant...Knowledge Engineering rediscovered, Towards Reasoning Patterns for the Semant...
Knowledge Engineering rediscovered, Towards Reasoning Patterns for the Semant...Frank van Harmelen
 
Csr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansenCsr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansenCSR2011
 
ECCV2010: distance function and metric learning part 2
ECCV2010: distance function and metric learning part 2ECCV2010: distance function and metric learning part 2
ECCV2010: distance function and metric learning part 2zukun
 
Lecture11
Lecture11Lecture11
Lecture11Bo Li
 
NEIU Permutation Algebra
NEIU Permutation AlgebraNEIU Permutation Algebra
NEIU Permutation Algebrachrislt521
 
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...vijayakrishna rowthu
 
bag-of-words models
bag-of-words models bag-of-words models
bag-of-words models Xiaotao Zou
 

What's hot (13)

Moving Cast Shadow Detection Using Physics-based Features (CVPR 2009)
Moving Cast Shadow Detection Using Physics-based Features (CVPR 2009)Moving Cast Shadow Detection Using Physics-based Features (CVPR 2009)
Moving Cast Shadow Detection Using Physics-based Features (CVPR 2009)
 
linear classification
linear classificationlinear classification
linear classification
 
Knowledge Engineering rediscovered, Towards Reasoning Patterns for the Semant...
Knowledge Engineering rediscovered, Towards Reasoning Patterns for the Semant...Knowledge Engineering rediscovered, Towards Reasoning Patterns for the Semant...
Knowledge Engineering rediscovered, Towards Reasoning Patterns for the Semant...
 
Csr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansenCsr2011 june14 12_00_hansen
Csr2011 june14 12_00_hansen
 
ECCV2010: distance function and metric learning part 2
ECCV2010: distance function and metric learning part 2ECCV2010: distance function and metric learning part 2
ECCV2010: distance function and metric learning part 2
 
Lecture11
Lecture11Lecture11
Lecture11
 
Gsdi10
Gsdi10Gsdi10
Gsdi10
 
Progress review1
Progress review1Progress review1
Progress review1
 
NEIU Permutation Algebra
NEIU Permutation AlgebraNEIU Permutation Algebra
NEIU Permutation Algebra
 
Content vs Context
Content vs ContextContent vs Context
Content vs Context
 
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...
A Unified PDE model for image multi-phase segmentation and grey-scale inpaint...
 
JavaYDL15
JavaYDL15JavaYDL15
JavaYDL15
 
bag-of-words models
bag-of-words models bag-of-words models
bag-of-words models
 

Similar to OOPSLA 2004 Presentation on Recovering Binary Class Relationships

Solvers and Applications with CP
Solvers and Applications with CPSolvers and Applications with CP
Solvers and Applications with CPiaudesc
 
IJCAI01 MSPC.ppt
IJCAI01 MSPC.pptIJCAI01 MSPC.ppt
IJCAI01 MSPC.pptPtidej Team
 
Instance Based Learning in Machine Learning
Instance Based Learning in Machine LearningInstance Based Learning in Machine Learning
Instance Based Learning in Machine LearningPavithra Thippanaik
 
Neo4j MeetUp - Graph Exploration with MetaExp
Neo4j MeetUp - Graph Exploration with MetaExpNeo4j MeetUp - Graph Exploration with MetaExp
Neo4j MeetUp - Graph Exploration with MetaExpAdrian Ziegler
 
So sánh cấu trúc protein_Protein structure comparison
So sánh cấu trúc protein_Protein structure comparisonSo sánh cấu trúc protein_Protein structure comparison
So sánh cấu trúc protein_Protein structure comparisonbomxuan868
 
Attentive Relational Networks for Mapping Images to Scene Graphs
Attentive Relational Networks for Mapping Images to Scene GraphsAttentive Relational Networks for Mapping Images to Scene Graphs
Attentive Relational Networks for Mapping Images to Scene GraphsSangmin Woo
 
Diversified Social Media Retrieval for News Stories
Diversified Social Media Retrieval for News StoriesDiversified Social Media Retrieval for News Stories
Diversified Social Media Retrieval for News StoriesBryan Gummibearehausen
 
"Demystifying Deep Neural Networks," a Presentation from BDTI
"Demystifying Deep Neural Networks," a Presentation from BDTI"Demystifying Deep Neural Networks," a Presentation from BDTI
"Demystifying Deep Neural Networks," a Presentation from BDTIEdge AI and Vision Alliance
 
Logics of Context and Modal Type Theories
Logics of Context and Modal Type TheoriesLogics of Context and Modal Type Theories
Logics of Context and Modal Type TheoriesValeria de Paiva
 
Distilling Linguistic Context for Language Model Compression
Distilling Linguistic Context for Language Model CompressionDistilling Linguistic Context for Language Model Compression
Distilling Linguistic Context for Language Model CompressionGyeongman Kim
 
Distilling Linguistic Context for Language Model Compression
Distilling Linguistic Context for Language Model CompressionDistilling Linguistic Context for Language Model Compression
Distilling Linguistic Context for Language Model CompressionGeonDoPark1
 
[Paper Reading] Learning Distributed Representations for Structured Output Pr...
[Paper Reading] Learning Distributed Representations for Structured Output Pr...[Paper Reading] Learning Distributed Representations for Structured Output Pr...
[Paper Reading] Learning Distributed Representations for Structured Output Pr...Yusuke Iwasawa
 
Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection aftab alam
 

Similar to OOPSLA 2004 Presentation on Recovering Binary Class Relationships (20)

Oopsla04.ppt
Oopsla04.pptOopsla04.ppt
Oopsla04.ppt
 
Solvers and Applications with CP
Solvers and Applications with CPSolvers and Applications with CP
Solvers and Applications with CP
 
IJCAI01 MSPC.ppt
IJCAI01 MSPC.pptIJCAI01 MSPC.ppt
IJCAI01 MSPC.ppt
 
Integration
IntegrationIntegration
Integration
 
Instance Based Learning in Machine Learning
Instance Based Learning in Machine LearningInstance Based Learning in Machine Learning
Instance Based Learning in Machine Learning
 
Neo4j MeetUp - Graph Exploration with MetaExp
Neo4j MeetUp - Graph Exploration with MetaExpNeo4j MeetUp - Graph Exploration with MetaExp
Neo4j MeetUp - Graph Exploration with MetaExp
 
Cascon04.ppt
Cascon04.pptCascon04.ppt
Cascon04.ppt
 
So sánh cấu trúc protein_Protein structure comparison
So sánh cấu trúc protein_Protein structure comparisonSo sánh cấu trúc protein_Protein structure comparison
So sánh cấu trúc protein_Protein structure comparison
 
Attentive Relational Networks for Mapping Images to Scene Graphs
Attentive Relational Networks for Mapping Images to Scene GraphsAttentive Relational Networks for Mapping Images to Scene Graphs
Attentive Relational Networks for Mapping Images to Scene Graphs
 
Diversified Social Media Retrieval for News Stories
Diversified Social Media Retrieval for News StoriesDiversified Social Media Retrieval for News Stories
Diversified Social Media Retrieval for News Stories
 
"Demystifying Deep Neural Networks," a Presentation from BDTI
"Demystifying Deep Neural Networks," a Presentation from BDTI"Demystifying Deep Neural Networks," a Presentation from BDTI
"Demystifying Deep Neural Networks," a Presentation from BDTI
 
Ijcai01 mspc.ppt
Ijcai01 mspc.pptIjcai01 mspc.ppt
Ijcai01 mspc.ppt
 
Logics of Context and Modal Type Theories
Logics of Context and Modal Type TheoriesLogics of Context and Modal Type Theories
Logics of Context and Modal Type Theories
 
TOOLS USA01.ppt
TOOLS USA01.pptTOOLS USA01.ppt
TOOLS USA01.ppt
 
ICSM09.ppt
ICSM09.pptICSM09.ppt
ICSM09.ppt
 
Distilling Linguistic Context for Language Model Compression
Distilling Linguistic Context for Language Model CompressionDistilling Linguistic Context for Language Model Compression
Distilling Linguistic Context for Language Model Compression
 
Distilling Linguistic Context for Language Model Compression
Distilling Linguistic Context for Language Model CompressionDistilling Linguistic Context for Language Model Compression
Distilling Linguistic Context for Language Model Compression
 
[Paper Reading] Learning Distributed Representations for Structured Output Pr...
[Paper Reading] Learning Distributed Representations for Structured Output Pr...[Paper Reading] Learning Distributed Representations for Structured Output Pr...
[Paper Reading] Learning Distributed Representations for Structured Output Pr...
 
Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection
 
HalifaxNGGs
HalifaxNGGsHalifaxNGGs
HalifaxNGGs
 

More from 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
 

More from 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
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
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
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
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!
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

OOPSLA 2004 Presentation on Recovering Binary Class Relationships

  • 1. This presentation has been given at OOPSLA, the 27th of October 2004, in Vancouver, BC, Canada. Recovering Binary Class Relationships: Putting Icing on the UML Cake Yann-Gaël Guéhéneuc Hervé Albin-Amiot Département d’informatique École des Mines de Nantes Software Engineering Laboratory Department of Computing Science and Operations Research University of Montreal © Yann-Gaël Guéhéneuc and Hervé Albin-Amiot
  • 2. Statements n Maintenance – 50% of the total cost of a program n Program understanding – 50% of the maintainers’ time n Anyhelp in understanding a program would reduce its cost! 2/32
  • 3. Context n OO maintenance – Source code • Most accurate source of information – Design models • Useful to understand source code (architecture of a program) • Non-existent or obsolete n Classdiagrams help in understanding 3/32 source code
  • 4. Approach n Automated recovery of class diagrams from program source code – Extract relevant information – Operational semantics for relevant constituents of class diagram – Consistent mapping • Concepts in programming languages • Concepts in modeling languages 4/32
  • 5. Problem n Use of our approach on Java and UML – UML class diagrams • Only a notation! As emphasised during the panel on “Model Driven Architecture” – Mapping • Semantic continuity for some concepts, such as classes, fields, methods • Discontinuity for binary class relationships 5/32
  • 6. Problem (cont’d) Java Should be recovered as Is recovered as 6/32
  • 7. Problem (cont’d) Java Should be recovered as Is recovered as 6/32
  • 8. Proposal n Studyof the reverse-engineering of binary class relationships – “Consensual” definitions • At design-level • At implementation-level – Properties – Formalisations – Recovery algorithms 7/32
  • 9. Proposal (cont’d) n Studyof the reverse-engineering of binary class relationships – Mapping between programming and modeling languages – Sound foundations • Understanding • Round-tripping • Design patterns identification • … and much more! 8/32
  • 10. Overview n Motivations n Formalisations n Recovery n Validations n Conclusion 9/32
  • 11. Definitions n Up to now, no consensual definitions n Study of more than 30 definitions n “Consensual” definitions Link Relationship Is described by Origin Means Target Origin Name Target Instance Direct Instance Entity Association Entity Instance Field Instance Class Aggregation Entity Instance Field + Instance Class Composition Entity Lifetime property “Entity” denotes either a class or an interface 10/32
  • 12. Definitions n Association – At design-level • Conceptual link between two classes • Multiple instances can be involved – At implementation-level • Message sends between instances of two classes, an origin and a target • Oriented, irreflexive, anti-symmetric at instance and class level; asymmetric at instance level 11/32
  • 13. Definitions n Aggregation – At design-level • An aggregation relationship is an association between two classes: The whole and the part – At implementation level • An aggregation relationship exists between classes A and B when the definition of A, the whole, contains instances of B, its part 12/32
  • 14. Definitions n Composition – At design-level • Aggregation where parts are destroyed when their whole is destroyed • Parts might be instantiated before the whole and exchanged – At implementation level • Aggregation with constraint on the lifetimes and on the ownership of the whole and of its part 13/32
  • 15. Properties n Four minimal properties – Exclusivity, an instance of B (b) is in relation with only one instance of A (a) – Invocation site, for method invocations from a to b – Lifetime, time of destruction of b wrt. a 14/32 – Multiplicity, number of b’s for one a
  • 16. Properties n Four minimal properties – Exclusivity, EX(A, B) ∈ – Invocation site, IS(A, B) ⊆ {field, parameter, local variable, …} – Lifetime, LT(A, B) ∈ {+, −} – Multiplicity, MU(A, B) ⊂ N ∪ {+∞} 15/32
  • 17. Formalisations n Rewritingbinary class relationships as conjunctions of their properties n Association AS(A, B) = (EX(A, B) ∈ B) ∧ (EX(B, A) ∈ B) ∧ (IS(A, B) ⊆ {field…}) ∧ (IS(B, A) = ∅) ∧ (LT(A, B) ∈ {+, −}) ∧ (LT(B, A) ∈ {+, −}) ∧ (MU(A, B) = [0, +∞]) ∧ (MU(B, A) = [0, +∞]) 16/32
  • 18. Formalisations n Aggregation AG(A, B) = (EX(A, B) ∈ B) ∧ (EX(B, A) ∈ B) ∧ (IS(A, B) ⊆ {field, array field, collection field}) ∧ (IS(B, A) = ∅) ∧ (LT(A, B) ∈ {+, −}) ∧ (LT(B, A) ∈ {+, −}) ∧ (MU(A, B) = [0, +∞]) ∧ 17/32 (MU(B, A) = [1, +∞])
  • 19. Formalisations n Composition CO(A, B) = (EX(A, B) = true) ∧ (EX(B, A) = false) ∧ (IS(A, B) ⊆ {field, array field, collection field}) ∧ (IS(B, A) = ∅) ∧ (LT(A, B) = +) ∧ (LT(B, A) = −) ∧ (MU(A, B) = [1, +∞]) ∧ 18/32 (MU(B, A) = [1, 1])
  • 20. Formalisations n Emergent characteristics – Minimality of the set of properties • See p. 307 of the proceedings – Order among binary class relationships • Association • Aggregation • Composition – Static and dynamic parts • IS(A, B), MU(A, B) 19/32 • EX(A, B), LT(A, B)
  • 21. Overview n Motivations n Formalisations n Recovery n Validations n Conclusion 20/32
  • 22. Recovery n Binary class relationships – Not syntactical constructs in source code – Expressed with four minimal properties n Recovery – Computation of the properties – Inference of existing relationships 21/32
  • 23. Recovery n Algorithms – Static analyses • IS(A, B), MU(A, B) – Dynamic analyses • EX(A, B), LT(A, B) 22/32
  • 24. Recovery n Algorithms – Order among the relationships – Association • IS(A, B) with respect to other classes – Aggregation • MU(A, B) with respect to associated classes – Composition • EX(A, B) with respect to aggregated classes • LT(A, B) 23/32
  • 25. Overview n Motivations n Formalisations n Recovery n Validations n Conclusion 24/32
  • 26. Model + Associations, PDL / PADL Implementations aggregations, and composition Caffeine n Meta-model Model + – PDL / PADL Associations, PDL / PADL aggregations n Static analyses – PatternsBox / Ptidej PatternsBox / Ptidej n Dynamic analyses Model PDL / PADL – Caffeine Dedicated parser Bytecodes 25/32 Java
  • 27. Experimentations n Case studies – Java AWT v1.2.2 • 367 classes – JHotDraw v5.1 • 171 classes – JUnit v3.7 • 45 classes 26/32
  • 28. Experimentations n Association – 4,925 for 583 classes but required for aggregation n Aggregation Frameworks Found Manual False Hits Java AWT 17 20 1 JHotDraw 6 8 0 JUnit 1 4 0 Total 24 32 1 Recall: 0.75 Precision: 0.96 n Composition 27/32 – Precision and recall of 100% (JUnit only)
  • 29. Experimentations n Emergent characteristics – Quantitative • Possible metrics – Qualitative • Assessment • Comparison – Practicality 28/32
  • 30. Overview n Motivations n Formalisations n Recovery n Validations n Conclusion 29/32
  • 31. Conclusion n Any help in understanding a program would reduce its cost n Automated recovery of class diagrams from program source code n Mapping for binary class relationships – “Consensual” definitions – Formalisations – Recovery algorithms 30/32
  • 32. Related work n Civello at OOPSLA 1993 – Classification of binary class relationships – No operational semantics n Henderson-Sellers and Barbier in L’Objet 1999 – Properties – Design-level n Jackson and Waingold at ISCE 1999 – Operational semantics 31/32 – Flavours of association, aggregation only
  • 33. Future work n Detection of other UML constituents n Static analyses vs. dynamic analyses n Experimental validations – Maintainers – Class diagrams with/without binary class relationships 32/32