SlideShare a Scribd company logo
1 of 35
Download to read offline
Object Flow Analysis –
Taking an Object-centric View
     on Dynamic Analysis


  Adrian Lienhard1, Stéphane Ducasse2 and Tudor Gîrba1
          1Software   Composition Group, University of Bern, Switzerland
                                   2 LISTIC, University of Savoie, France
A missing aspect of OO
               dynamic analysis
    Typical characterization of OO program execution:
         1) message passing
         2) object interrelationships


    How are objects passed throught the system?


Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
1) the method execution perspective
                                                        MethodNode>>generate
                                                          ASTTranslator class>>new
                                                              ...
                                                                  ...
                                                                      IRBuilder>>initialize
                                                                         IRMethod class>>new
                                                                           ...
                                                          ASTTranslator>>visitNode:
                                                          ASTTranslator>>ir
                                                          IRMethod>>compiledMethod
                                                             IRTranlator class>new




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
1) the method execution perspective
                                                        MethodNode>>generate
                                                          ASTTranslator class>>new
                                                              ...
                                                                  ...
                                                                      IRBuilder>>initialize
“How is the IRMethod                                                     IRMethod class>>new
instance passed to                                    ?
                                                                           ...
                                                          ASTTranslator>>visitNode:
MethodNode?”                                              ASTTranslator>>ir
                                                          IRMethod>>compiledMethod
                                                             IRTranlator class>new




 Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
2) the object interrelationship perspective




                                                                         :IRMethod                       :MethodNode




                                                         :IRBuilder                     :IRSequence



                                                                                                        :ASTTranslator




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
2) the object interrelationship perspective



                                                                   ?

“How is the IRMethod                                                      :IRMethod                       :MethodNode


instance passed to
MethodNode?”
                                                          :IRBuilder                     :IRSequence



                                                                                                         :ASTTranslator




 Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
MethodNode>>generate
    ASTTranslator class>>new
        ...                                                                                  ?
            ...
                                                                                                   :IRMethod                 :MethodNode
                IRBuilder>>initialize
                   IRMethod class>>new

?
                     ...
    ASTTranslator>>visitNode:
                                         interdependency?
                                                                                      :IRBuilder               :IRSequence
    ASTTranslator>>ir
    IRMethod>>compiledMethod
       IRTranlator class>new                                                                                             :ASTTranslator




  Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
MethodNode>>generate
    ASTTranslator class>>new
        ...                                                                                  ?
            ...
                                                                                                   :IRMethod                 :MethodNode
                IRBuilder>>initialize
                   IRMethod class>>new

?
                     ...
    ASTTranslator>>visitNode:
                                         interdependency?
                                                                                      :IRBuilder               :IRSequence
    ASTTranslator>>ir
    IRMethod>>compiledMethod
       IRTranlator class>new                                                                                             :ASTTranslator




                        Object Flow Analysis
                  track the transfer of object references



  Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Object Flow                                       IRBuilder>>initialize
                                                    ir := IRMethod new.
                                                                                                         instantiation

                                                                                                         field store

 Analysis
                                                    ...

                                                  IRBuilder>>startNewSequence
                                                    newSequence := IRSequence new.
                                                    newSequence method: ir.                              field read

                                                  IRSequence>>method: aMethod                           argument
                                                    method := aMethod.                                  field store


a) capture all
                                                  ASTTranslator>>ir
                                                    ^ builder ir.                                         return

references of an                                  MethodNode>>generate

object                                              ast := ASTTranslator new visitNode: self.
                                                    ir := ast ir.                                        return
                                                    ^ ir compiledMethod.                                 field store
                                                                                                         field read

b) track the                                      IRMethod>>compiledMethod
                                                    ^ compiledMethod := IRTranslator new
transfer of                                             interpret: self;
                                                        compiledMethod.
references                                        IRTranslator>>interpret: ir                            argument
                                                    ...


 Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Object Flow                                       IRBuilder>>initialize
                                                    ir := IRMethod new.
                                                                                                         instantiation
                                                                                                           instantiation
                                                                                                            field write
                                                                                                         field write

 Analysis
                                                    ...

                                                  IRBuilder>>startNewSequence
                                                    newSequence := IRSequence new.
                                                    newSequence method: ir.                              field read

                                                  IRSequence>>method: aMethod                           argument
                                                    method := aMethod.                                  field write


a) capture all
                                                  ASTTranslator>>ir
                                                    ^ builder ir.                                         return      return

references of an                                  MethodNode>>generate

object                                              ast := ASTTranslator new visitNode: self.
                                                    ir := ast ir.                                        return       return
                                                    ^ ir compiledMethod.                                 field write field write
                                                                                                         field read field read

b) track the                                      IRMethod>>compiledMethod
                                                    ^ compiledMethod := IRTranslator new
transfer of                                             interpret: self;
                                                        compiledMethod.
references                                        IRTranslator>>interpret: ir                            argumentargument
                                                    ...


 Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Object Flow                                          IRBuilder>>initialize
                                                       ir := IRMethod new.
                                                                                                          instantiation
                                                                                                            instantiation
                                                                                                             field store
                                                                                                                   write
                                                                                                          field write
                                                                                                                               1


 Analysis
                                                       ...    1

                                                     IRBuilder>>startNewSequence
                                                       newSequence := IRSequence new.
                                                       newSequence method: ir.                            field read
                                                 2                                                                     2
                                                     IRSequence>>method: aMethod                         argument
                                                       method := aMethod.                                field store
                                                                                                              write


“How is the IRMethod
                                                   ASTTranslator>>ir
                                                     ^ builder ir.                                         return      return

instance passed to                                3
                                                   MethodNode>>generate
                                                                                                                           3


MethodNode?”                                         ast := ASTTranslator new visitNode: self.
                                                     ir := ast ir.                                        return       return
                                                     ^ ir compiledMethod.                                 field write field write
                                                                                                                          store
                                                                                                          field read field read
                                                     IRMethod>>compiledMethod
                                                       ^ compiledMethod := IRTranslator new
                                                           interpret: self;
                                                           compiledMethod.

                                                     IRTranslator>>interpret: ir                          argumentargument
                                                       ...


  Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Application

                        How do classes
                       exchange objects?


Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Inter-unit
                                                                                   flow view




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Inter-unit
                                                                                   flow view
                                                               classes
                                                                  containedInPackage: ʼAST-Nodesʼ
                                                                  mapTo: ʼASTʼ.

                                                               classes
                                                                  hierarchyRootedIn: ʼIRInstructionʼ
                                                                  mapTo: ʼIntermediate-Representationʼ




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Inter-unit
                                                                                   flow view




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Chronological
                                                                        propagation




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Chronological
                                                                        propagation




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Chronological
                                                                        propagation




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Parser (4)




                                                                      Spanning flows




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Spanning flows

       IRBuilder




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
timeline
Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
objects created in
                          IRBuilder




                                                                                   timeline
Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
timeline
Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
objects passed
                                                                                         through directly




                                                                                   timeline
Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
timeline
Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
objects stored
                                       in an instance
                                          variable


                                                                                   timeline
Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
timeline
Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
objects passed out
                    multiple times




                                                                                   timeline
Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
timeline
Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Representing object flows
IRBuilder>>initialize                                        instantiation
  ir := IRMethod new.
  ...                                                         field store
                                                                   write

IRBuilder>>startNewSequence
  newSequence := IRSequence new.
  newSequence method: ir.                                 field read

IRSequence>>method: aMethod                               argument
  method := aMethod.                                      field store
                                                               write

ASTTranslator>>ir
  ^ builder ir.                                                         return

MethodNode>>generate
  ast := ASTTranslator new visitNode: self.
                                                                         return
  ir := ast ir.
                                                                       field store
  ^ ir compiledMethod.
                                                                       field read
                                                                           ...



    Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Representing object flows
IRBuilder>>initialize                                        instantiation
  ir := IRMethod new.                                                                                         Instance
  ...                                                         field store
                                                                   write

IRBuilder>>startNewSequence
  newSequence := IRSequence new.
                                                          field read                         parent
  newSequence method: ir.                                                                      0..1
                                                                                                               Alias
IRSequence>>method: aMethod                               argument
                                                                                                          *
  method := aMethod.                                      field store
                                                               write
                                                                                                      child
ASTTranslator>>ir
  ^ builder ir.                                                         return

MethodNode>>generate
  ast := ASTTranslator new visitNode: self.
                                                                         return
  ir := ast ir.
                                                                       field store
  ^ ir compiledMethod.
                                                                       field read
                                                                           ...



    Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Representing object flows
          instantiation
                                                          Instance
           field store
                write



        field read                       parent
                                           0..1
                                                           Alias
        argument
                                                      *
        field store
             write
                                                  child

                      return
                                        ...        ArgumentAlias              ReturnAlias           FieldWriteAlias

self.
                       return
                     field store
                     field read
                         ...



           Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Representing object flows
n
                             Instance                                                             Class


                                                                sender
            parent                                             0..1       *
               0..1                         receiver
                              Alias                               Activation                     Method
                         *
                      child                                creator
                                                                                                              Attribute

turn
            ...        ArgumentAlias              ReturnAlias            FieldWriteAlias

 turn
   store
d read
 ...



           Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Summary
        IRBuilder>>initialize                           instantiation
          ir := IRMethod new.                                                                    Instance                                             Class
          ...                                            field store
                                                              write

        IRBuilder>>startNewSequence                                                                                        sender
          newSequence := IRSequence new.                                                                                  0..1
                                                      field read                 parent                                                *
          newSequence method: ir.                                                  0..1                     receiver
                                                                                                  Alias                       Activation              Method
        IRSequence>>method: aMethod                   argument
                                                                                             *
          method := aMethod.                          field write
                                                           store                                                       creator
                                                                                          child
                                                                                                                                                               Attribute
        ASTTranslator>>ir
          ^ builder ir.                                             return
                                                                                ...        ArgumentAlias        ReturnAlias         FieldWriteAlias
        MethodNode>>generate
          ast := ASTTranslator new visitNode: self.
                                                                     return
          ir := ast ir.
                                                                   field store
          ^ ir compiledMethod.
                                                                   field read
                                                                       ...




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
Summary
        IRBuilder>>initialize                           instantiation
          ir := IRMethod new.                                                                    Instance                                             Class
          ...                                            field store
                                                              write

        IRBuilder>>startNewSequence                                                                                        sender
          newSequence := IRSequence new.                                                                                  0..1
                                                      field read                 parent                                                *
          newSequence method: ir.                                                  0..1                     receiver
                                                                                                  Alias                       Activation              Method
        IRSequence>>method: aMethod                   argument
                                                                                             *
          method := aMethod.                          field write
                                                           store                                                       creator
                                                                                          child
                                                                                                                                                               Attribute
        ASTTranslator>>ir
          ^ builder ir.                                             return
                                                                                ...        ArgumentAlias        ReturnAlias         FieldWriteAlias
        MethodNode>>generate
          ast := ASTTranslator new visitNode: self.
                                                                     return
          ir := ast ir.
                                                                   field store
          ^ ir compiledMethod.
                                                                   field read
                                                                       ...




                                                                     Questions?




Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch

More Related Content

Viewers also liked

Developing distributed analysis pipelines with shared community resources usi...
Developing distributed analysis pipelines with shared community resources usi...Developing distributed analysis pipelines with shared community resources usi...
Developing distributed analysis pipelines with shared community resources usi...Brad Chapman
 
Heirloom Travel: Wine Country - Petaluma
Heirloom Travel: Wine Country - PetalumaHeirloom Travel: Wine Country - Petaluma
Heirloom Travel: Wine Country - PetalumaIceMilk Aprons
 
Amazon resource for bioinformatics
Amazon resource for bioinformaticsAmazon resource for bioinformatics
Amazon resource for bioinformaticsBrad Chapman
 
Wolko1- Afiches de cine
Wolko1- Afiches de cineWolko1- Afiches de cine
Wolko1- Afiches de cineguest0b0bd35
 
The San Diego LGBT Community Center
The San Diego LGBT Community CenterThe San Diego LGBT Community Center
The San Diego LGBT Community CenterSociologistTina
 
Twitter en Facebook voor journalisten
Twitter en Facebook voor journalistenTwitter en Facebook voor journalisten
Twitter en Facebook voor journalistenBart Van Belle
 
Week5-Group-J
Week5-Group-JWeek5-Group-J
Week5-Group-Js1160114
 
Tracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature DependenciesTracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature Dependencieslienhard
 
LiveOffice Email Archiving & Compliance 301
LiveOffice Email Archiving & Compliance 301LiveOffice Email Archiving & Compliance 301
LiveOffice Email Archiving & Compliance 301Veritas Technologies LLC
 
Accomplishment, Aspirations & Challenges: Boston
Accomplishment, Aspirations & Challenges: BostonAccomplishment, Aspirations & Challenges: Boston
Accomplishment, Aspirations & Challenges: BostonThe Hub Milan
 

Viewers also liked (19)

Windowsxp
WindowsxpWindowsxp
Windowsxp
 
Developing distributed analysis pipelines with shared community resources usi...
Developing distributed analysis pipelines with shared community resources usi...Developing distributed analysis pipelines with shared community resources usi...
Developing distributed analysis pipelines with shared community resources usi...
 
Heirloom Travel: Wine Country - Petaluma
Heirloom Travel: Wine Country - PetalumaHeirloom Travel: Wine Country - Petaluma
Heirloom Travel: Wine Country - Petaluma
 
Amazon resource for bioinformatics
Amazon resource for bioinformaticsAmazon resource for bioinformatics
Amazon resource for bioinformatics
 
Wolko1- Afiches de cine
Wolko1- Afiches de cineWolko1- Afiches de cine
Wolko1- Afiches de cine
 
The San Diego LGBT Community Center
The San Diego LGBT Community CenterThe San Diego LGBT Community Center
The San Diego LGBT Community Center
 
201106 WICSA
201106 WICSA201106 WICSA
201106 WICSA
 
VU 19 Nov 09
VU 19  Nov 09VU 19  Nov 09
VU 19 Nov 09
 
199912 outsight
199912 outsight199912 outsight
199912 outsight
 
Twitter en Facebook voor journalisten
Twitter en Facebook voor journalistenTwitter en Facebook voor journalisten
Twitter en Facebook voor journalisten
 
Final programme 27 06
Final programme 27 06Final programme 27 06
Final programme 27 06
 
201506 CSE340 Lecture 13
201506 CSE340 Lecture 13201506 CSE340 Lecture 13
201506 CSE340 Lecture 13
 
Week5-Group-J
Week5-Group-JWeek5-Group-J
Week5-Group-J
 
Tracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature DependenciesTracking Objects To Detect Feature Dependencies
Tracking Objects To Detect Feature Dependencies
 
Farma
FarmaFarma
Farma
 
LiveOffice Email Archiving & Compliance 301
LiveOffice Email Archiving & Compliance 301LiveOffice Email Archiving & Compliance 301
LiveOffice Email Archiving & Compliance 301
 
Accomplishment, Aspirations & Challenges: Boston
Accomplishment, Aspirations & Challenges: BostonAccomplishment, Aspirations & Challenges: Boston
Accomplishment, Aspirations & Challenges: Boston
 
201506 CSE340 Lecture 14
201506 CSE340 Lecture 14201506 CSE340 Lecture 14
201506 CSE340 Lecture 14
 
201107 ICALT
201107 ICALT201107 ICALT
201107 ICALT
 

More from lienhard

Prototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptPrototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptlienhard
 
Virtual Machines Lecture
Virtual Machines LectureVirtual Machines Lecture
Virtual Machines Lecturelienhard
 
Flow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time DebuggingFlow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time Debugginglienhard
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysislienhard
 
Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)lienhard
 
Rapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using MondrianRapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using Mondrianlienhard
 
Practical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time DebuggingPractical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time Debugginglienhard
 
Test Blueprints
Test BlueprintsTest Blueprints
Test Blueprintslienhard
 
Identifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept AnalysisIdentifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept Analysislienhard
 

More from lienhard (10)

Chicken
ChickenChicken
Chicken
 
Prototype-based Programming with JavaScript
Prototype-based Programming with JavaScriptPrototype-based Programming with JavaScript
Prototype-based Programming with JavaScript
 
Virtual Machines Lecture
Virtual Machines LectureVirtual Machines Lecture
Virtual Machines Lecture
 
Flow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time DebuggingFlow-Centric, Back-In-Time Debugging
Flow-Centric, Back-In-Time Debugging
 
OORPT Dynamic Analysis
OORPT Dynamic AnalysisOORPT Dynamic Analysis
OORPT Dynamic Analysis
 
Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)Dynamic Object Flow Analysis (PhD Defense)
Dynamic Object Flow Analysis (PhD Defense)
 
Rapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using MondrianRapid Prototyping Of Visualizations Using Mondrian
Rapid Prototyping Of Visualizations Using Mondrian
 
Practical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time DebuggingPractical Object-Oriented Back-in-Time Debugging
Practical Object-Oriented Back-in-Time Debugging
 
Test Blueprints
Test BlueprintsTest Blueprints
Test Blueprints
 
Identifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept AnalysisIdentifying Traits with Formal Concept Analysis
Identifying Traits with Formal Concept Analysis
 

Recently uploaded

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Object Flow Analysis

  • 1. Object Flow Analysis – Taking an Object-centric View on Dynamic Analysis Adrian Lienhard1, Stéphane Ducasse2 and Tudor Gîrba1 1Software Composition Group, University of Bern, Switzerland 2 LISTIC, University of Savoie, France
  • 2. A missing aspect of OO dynamic analysis Typical characterization of OO program execution: 1) message passing 2) object interrelationships How are objects passed throught the system? Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 3. 1) the method execution perspective MethodNode>>generate ASTTranslator class>>new ... ... IRBuilder>>initialize IRMethod class>>new ... ASTTranslator>>visitNode: ASTTranslator>>ir IRMethod>>compiledMethod IRTranlator class>new Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 4. 1) the method execution perspective MethodNode>>generate ASTTranslator class>>new ... ... IRBuilder>>initialize “How is the IRMethod IRMethod class>>new instance passed to ? ... ASTTranslator>>visitNode: MethodNode?” ASTTranslator>>ir IRMethod>>compiledMethod IRTranlator class>new Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 5. 2) the object interrelationship perspective :IRMethod :MethodNode :IRBuilder :IRSequence :ASTTranslator Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 6. 2) the object interrelationship perspective ? “How is the IRMethod :IRMethod :MethodNode instance passed to MethodNode?” :IRBuilder :IRSequence :ASTTranslator Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 7. MethodNode>>generate ASTTranslator class>>new ... ? ... :IRMethod :MethodNode IRBuilder>>initialize IRMethod class>>new ? ... ASTTranslator>>visitNode: interdependency? :IRBuilder :IRSequence ASTTranslator>>ir IRMethod>>compiledMethod IRTranlator class>new :ASTTranslator Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 8. MethodNode>>generate ASTTranslator class>>new ... ? ... :IRMethod :MethodNode IRBuilder>>initialize IRMethod class>>new ? ... ASTTranslator>>visitNode: interdependency? :IRBuilder :IRSequence ASTTranslator>>ir IRMethod>>compiledMethod IRTranlator class>new :ASTTranslator Object Flow Analysis track the transfer of object references Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 9. Object Flow IRBuilder>>initialize ir := IRMethod new. instantiation field store Analysis ... IRBuilder>>startNewSequence newSequence := IRSequence new. newSequence method: ir. field read IRSequence>>method: aMethod argument method := aMethod. field store a) capture all ASTTranslator>>ir ^ builder ir. return references of an MethodNode>>generate object ast := ASTTranslator new visitNode: self. ir := ast ir. return ^ ir compiledMethod. field store field read b) track the IRMethod>>compiledMethod ^ compiledMethod := IRTranslator new transfer of interpret: self; compiledMethod. references IRTranslator>>interpret: ir argument ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 10. Object Flow IRBuilder>>initialize ir := IRMethod new. instantiation instantiation field write field write Analysis ... IRBuilder>>startNewSequence newSequence := IRSequence new. newSequence method: ir. field read IRSequence>>method: aMethod argument method := aMethod. field write a) capture all ASTTranslator>>ir ^ builder ir. return return references of an MethodNode>>generate object ast := ASTTranslator new visitNode: self. ir := ast ir. return return ^ ir compiledMethod. field write field write field read field read b) track the IRMethod>>compiledMethod ^ compiledMethod := IRTranslator new transfer of interpret: self; compiledMethod. references IRTranslator>>interpret: ir argumentargument ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 11. Object Flow IRBuilder>>initialize ir := IRMethod new. instantiation instantiation field store write field write 1 Analysis ... 1 IRBuilder>>startNewSequence newSequence := IRSequence new. newSequence method: ir. field read 2 2 IRSequence>>method: aMethod argument method := aMethod. field store write “How is the IRMethod ASTTranslator>>ir ^ builder ir. return return instance passed to 3 MethodNode>>generate 3 MethodNode?” ast := ASTTranslator new visitNode: self. ir := ast ir. return return ^ ir compiledMethod. field write field write store field read field read IRMethod>>compiledMethod ^ compiledMethod := IRTranslator new interpret: self; compiledMethod. IRTranslator>>interpret: ir argumentargument ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 12. Application How do classes exchange objects? Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 13. Inter-unit flow view Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 14. Inter-unit flow view classes containedInPackage: ʼAST-Nodesʼ mapTo: ʼASTʼ. classes hierarchyRootedIn: ʼIRInstructionʼ mapTo: ʼIntermediate-Representationʼ Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 15. Inter-unit flow view Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 16. Chronological propagation Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 17. Chronological propagation Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 18. Chronological propagation Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 19. Parser (4) Spanning flows Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 20. Spanning flows IRBuilder Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 21. timeline Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 22. objects created in IRBuilder timeline Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 23. timeline Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 24. objects passed through directly timeline Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 25. timeline Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 26. objects stored in an instance variable timeline Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 27. timeline Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 28. objects passed out multiple times timeline Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 29. timeline Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 30. Representing object flows IRBuilder>>initialize instantiation ir := IRMethod new. ... field store write IRBuilder>>startNewSequence newSequence := IRSequence new. newSequence method: ir. field read IRSequence>>method: aMethod argument method := aMethod. field store write ASTTranslator>>ir ^ builder ir. return MethodNode>>generate ast := ASTTranslator new visitNode: self. return ir := ast ir. field store ^ ir compiledMethod. field read ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 31. Representing object flows IRBuilder>>initialize instantiation ir := IRMethod new. Instance ... field store write IRBuilder>>startNewSequence newSequence := IRSequence new. field read parent newSequence method: ir. 0..1 Alias IRSequence>>method: aMethod argument * method := aMethod. field store write child ASTTranslator>>ir ^ builder ir. return MethodNode>>generate ast := ASTTranslator new visitNode: self. return ir := ast ir. field store ^ ir compiledMethod. field read ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 32. Representing object flows instantiation Instance field store write field read parent 0..1 Alias argument * field store write child return ... ArgumentAlias ReturnAlias FieldWriteAlias self. return field store field read ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 33. Representing object flows n Instance Class sender parent 0..1 * 0..1 receiver Alias Activation Method * child creator Attribute turn ... ArgumentAlias ReturnAlias FieldWriteAlias turn store d read ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 34. Summary IRBuilder>>initialize instantiation ir := IRMethod new. Instance Class ... field store write IRBuilder>>startNewSequence sender newSequence := IRSequence new. 0..1 field read parent * newSequence method: ir. 0..1 receiver Alias Activation Method IRSequence>>method: aMethod argument * method := aMethod. field write store creator child Attribute ASTTranslator>>ir ^ builder ir. return ... ArgumentAlias ReturnAlias FieldWriteAlias MethodNode>>generate ast := ASTTranslator new visitNode: self. return ir := ast ir. field store ^ ir compiledMethod. field read ... Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch
  • 35. Summary IRBuilder>>initialize instantiation ir := IRMethod new. Instance Class ... field store write IRBuilder>>startNewSequence sender newSequence := IRSequence new. 0..1 field read parent * newSequence method: ir. 0..1 receiver Alias Activation Method IRSequence>>method: aMethod argument * method := aMethod. field write store creator child Attribute ASTTranslator>>ir ^ builder ir. return ... ArgumentAlias ReturnAlias FieldWriteAlias MethodNode>>generate ast := ASTTranslator new visitNode: self. return ir := ast ir. field store ^ ir compiledMethod. field read ... Questions? Object Flow Analysis — Taking an Object-centric View on Dynamic Analysis : : Adrian Lienhard : : lienhard@iam.unibe.ch