SlideShare a Scribd company logo
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
 
linear classification
linear classificationlinear classification
linear classification
nep_test_account
 
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_hansen
CSR2011
 
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
zukun
 
Lecture11
Lecture11Lecture11
Lecture11
Bo Li
 
Gsdi10
Gsdi10Gsdi10
Progress review1
Progress review1Progress review1
Progress review1
Isa Restrepo
 
NEIU Permutation Algebra
NEIU Permutation AlgebraNEIU Permutation Algebra
NEIU Permutation Algebra
chrislt521
 
Content vs Context
Content vs ContextContent vs Context
Content vs Context
Angelo Oldani
 
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
 
JavaYDL15
JavaYDL15JavaYDL15
JavaYDL15
Terry Yoast
 
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 OOPSLA04.ppt

Oopsla04.ppt
Oopsla04.pptOopsla04.ppt
Solvers and Applications with CP
Solvers and Applications with CPSolvers and Applications with CP
Solvers and Applications with CP
iaudesc
 
IJCAI01 MSPC.ppt
IJCAI01 MSPC.pptIJCAI01 MSPC.ppt
IJCAI01 MSPC.ppt
Ptidej Team
 
Integration
IntegrationIntegration
Instance Based Learning in Machine Learning
Instance Based Learning in Machine LearningInstance Based Learning in Machine Learning
Instance Based Learning in Machine Learning
Pavithra Thippanaik
 
Neo4j MeetUp - Graph Exploration with MetaExp
Neo4j MeetUp - Graph Exploration with MetaExpNeo4j MeetUp - Graph Exploration with MetaExp
Neo4j MeetUp - Graph Exploration with MetaExp
Adrian Ziegler
 
Cascon04.ppt
Cascon04.pptCascon04.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
bomxuan868
 
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
Sangmin 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 Stories
Bryan 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 BDTI
Edge AI and Vision Alliance
 
Ijcai01 mspc.ppt
Ijcai01 mspc.pptIjcai01 mspc.ppt
Ijcai01 mspc.ppt
Yann-Gaël Guéhéneuc
 
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
Valeria de Paiva
 
TOOLS USA01.ppt
TOOLS USA01.pptTOOLS USA01.ppt
TOOLS USA01.ppt
Ptidej Team
 
ICSM09.ppt
ICSM09.pptICSM09.ppt
ICSM09.ppt
Ptidej Team
 
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
GeonDoPark1
 
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
Gyeongman Kim
 
[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
 
HalifaxNGGs
HalifaxNGGsHalifaxNGGs
HalifaxNGGs
Nikos Kostagiolas
 

Similar to OOPSLA04.ppt (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 Miniaturisation
Ptidej Team
 
Presentation
PresentationPresentation
Presentation
Ptidej Team
 
Presentation
PresentationPresentation
Presentation
Ptidej Team
 
Presentation
PresentationPresentation
Presentation
Ptidej Team
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel Briand
Ptidej Team
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel Abdellatif
Ptidej Team
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh Kermansaravi
Ptidej Team
 
Mouna Abidi
Mouna AbidiMouna Abidi
Mouna Abidi
Ptidej Team
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel Grichi
Ptidej Team
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano Politowski
Ptidej 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 crisis
Ptidej Team
 
MIPA
MIPAMIPA
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.ppt
Ptidej Team
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.ppt
Ptidej Team
 
Medicine15.ppt
Medicine15.pptMedicine15.ppt
Medicine15.ppt
Ptidej Team
 
Qrs17b.ppt
Qrs17b.pptQrs17b.ppt
Qrs17b.ppt
Ptidej Team
 
Icpc11c.ppt
Icpc11c.pptIcpc11c.ppt
Icpc11c.ppt
Ptidej Team
 
Icsme16.ppt
Icsme16.pptIcsme16.ppt
Icsme16.ppt
Ptidej Team
 
Msr17a.ppt
Msr17a.pptMsr17a.ppt
Msr17a.ppt
Ptidej Team
 
Icsoc15.ppt
Icsoc15.pptIcsoc15.ppt
Icsoc15.ppt
Ptidej 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

Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

OOPSLA04.ppt

  • 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