SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
Demand-Driven Context-Sensitive Alias
         Analysis for Java

                      Dacong (Tony) Yan
                      Guoqing (Harry) Xu
                       Atanas Rountev
                     Ohio State University

     PRESTO: Program Analyses and Software Tools Research Group, Ohio State University
Alias Analysis
    • Many static analysis tools need highly precise and
      efficiently-computed alias information
    • Desirable properties
      – Demand-driven: query “could x and y alias?”
      – Client-driven: client-defined time budget for a query
    • Typical solution: use points-to analysis
      – Compute the objects that x may point to; same for y;
        are there common objects?
    • Goal: answer alias queries precisely and efficiently,
      without computing the complete points-to sets

2
Redundancy in Points-to Analysis




3
Redundancy in Points-to Analysis


    m(a) {
        b = a;
        x = a.f;
        y = b.f;
    }

3
Redundancy in Points-to Analysis


    m(a) {
        b = a;
        x = a.f;
        y = b.f;
                               alias?
                   x                        y
    }

3
Redundancy in Points-to Analysis


    m(a) {                           O
        b = a;
                       points-to?            points-to?
        x = a.f;
        y = b.f;
                                    alias?
                   x                                      y
    }

3
Redundancy in Points-to Analysis


    m(a) {
        b = a;
        x = a.f;
        y = b.f;
                       f                    f
                   x       a           b        y
    }

3
Redundancy in Points-to Analysis


    m(a) {
        b = a;
        x = a.f;
        y = b.f;
                       f       alias?       f
                   x       a            b       y
    }

3
Redundancy in Points-to Analysis


    m(a) {
        b = a;                          O
        x = a.f;
                           points-to?    points-to?
        y = b.f;
                       f           alias?             f
                   x        a                   b         y
    }

3
Redundancy in Points-to Analysis


    m(a) {
        b = a;
        x = a.f;
        y = b.f;               alias
                       f                    f
                   x       a           b        y
    }

3
Redundancy in Points-to Analysis


    m(a) {
        b = a;
        x = a.f;
        y = b.f;               alias
                       f                    f
                   x       a           b        y
    }
                               alias
3
Our Approach
    • Alias analysis
      – Demand-driven and client-driven
      – Field-sensitive and calling-context-sensitive
      – Does not require complete points-to set computation
      – Better performance through method summaries
    • Symbolic Points-to Graph
      – A specialized program representation that enables the
        demand-driven alias analysis
      – Facilitates computation and use of method summaries



4
Program Representation
    • Intraprocedural Symbolic Points-To Graph
      – Introduce a symbolic object node s for each
         • formal parameter
         • field read a.fld
         • a call site that returns a reference-typed value
      – Compute intraprocedural points-to relationships

     m(a) {
       c = new …; // o1      a         sa          o1         c
                                             f
                                                     g
       a.f = c;
       return c.g;                    ret          sg
     }
5
Interprocedural Symbolic Points-To Graph
    • Connect the intraprocedural graphs using entry
      and exit edges




6
Interprocedural Symbolic Points-To Graph
    • Connect the intraprocedural graphs using entry
      and exit edges
    m(a) {
      c = new …; // o1
      a.f = c;
      return c.g;
    }




6
Interprocedural Symbolic Points-To Graph
    • Connect the intraprocedural graphs using entry
      and exit edges
    m(a) {                            f
                         a       sa           o1   c
      c = new …; // o1                    g
      a.f = c;
                                ret           sg
      return c.g;
    }




6
Interprocedural Symbolic Points-To Graph
    • Connect the intraprocedural graphs using entry
      and exit edges
    m(a) {                            f
                          a      sa           o1   c
      c = new …; // o1                    g
      a.f = c;
                                ret           sg
      return c.g;
    }

    d = new …; // o2
    b = m(d); // call m



6
Interprocedural Symbolic Points-To Graph
    • Connect the intraprocedural graphs using entry
      and exit edges
    m(a) {                             f
                          a      sa            o1   c
      c = new …; // o1                     g
      a.f = c;
                                ret            sg
      return c.g;
    }
                                 o2            d
    d = new …; // o2
                                   b           sm
    b = m(d); // call m



6
Interprocedural Symbolic Points-To Graph
    • Connect the intraprocedural graphs using entry
      and exit edges
    m(a) {                               f
                            a      sa            o1    c
      c = new …; // o1                       g
      a.f = c;
                          entrym   ret           sg
      return c.g;
                                                      exitm
    }
                                   o2            d
    d = new …; // o2
                                     b           sm
    b = m(d); // call m



6
Alias Analysis Formulation
    • Field-sensitivity and calling-context-sensitivity:
      matched points-to edges and entry/exit edges
    • Traverses the object nodes (including symbolic
      ones) and the edges between them




7
Alias Analysis Formulation
    • Field-sensitivity and calling-context-sensitivity:
      matched points-to edges and entry/exit edges
    • Traverses the object nodes (including symbolic
      ones) and the edges between them
                  a      o1           s3     c
                         f             f
                  b     o2            s2     d
                      entry1        exit1
                               s1

7
Alias Analysis Formulation
    • Field-sensitivity and calling-context-sensitivity:
      matched points-to edges and entry/exit edges
    • Traverses the object nodes (including symbolic
      ones) and the edges between them
                  a      o1           s3     c
                         f                f
                  b     o2             s2     d
                      entry1         exit1
                                s1

7
                             a alias? c
Alias Analysis Formulation
    • Field-sensitivity and calling-context-sensitivity:
      matched points-to edges and entry/exit edges
    • Traverses the object nodes (including symbolic
      ones) and the edges between them
                  a      o1           s3     c
                           f             f
                   b      o2            s2    d
                        entry1        exit1
                                 s1
                        may represent the
              o1                                  s3
7                      same concrete object?
Alias Analysis Formulation
    • Field-sensitivity and calling-context-sensitivity:
      matched points-to edges and entry/exit edges
    • Traverses the object nodes (including symbolic
      ones) and the edges between them
                  a      o1           s3     c
                         f             f
                  b     o2            s2     d
                      entry1        exit1
                               s1

              o1 f o2                            s3
7
Alias Analysis Formulation
    • Field-sensitivity and calling-context-sensitivity:
      matched points-to edges and entry/exit edges
    • Traverses the object nodes (including symbolic
      ones) and the edges between them
                  a      o1           s3     c
                         f              f
                   b    o2             s2    d
                       entry1        exit1
                                s1

              o1   f o entry1 s                  s3
                      2        1
7
Alias Analysis Formulation
    • Field-sensitivity and calling-context-sensitivity:
      matched points-to edges and entry/exit edges
    • Traverses the object nodes (including symbolic
      ones) and the edges between them
                  a      o1           s3     c
                         f              f
                   b    o2             s2    d
                       entry1        exit1
                                s1

              o1   f o entry1 s exit1 s          s3
                      2        1       2
7
Alias Analysis Formulation
    • Field-sensitivity and calling-context-sensitivity:
      matched points-to edges and entry/exit edges
    • Traverses the object nodes (including symbolic
      ones) and the edges between them
                  a      o1           s3     c
                          f                f
                   b      o2              s2         d
                       entry1           exit1
                                  s1
                   f o         entry1, exit1
              o1      2                         s2       s3
7
Alias Analysis Formulation
    • Field-sensitivity and calling-context-sensitivity:
      matched points-to edges and entry/exit edges
    • Traverses the object nodes (including symbolic
      ones) and the edges between them
                  a      o1           s3     c
                          f                f
                   b      o2              s2      d
                       entry1           exit1
                                  s1
                   f o         entry1, exit1
              o1      2                         s2 f   s3
7
Alias Analysis Formulation
    • Field-sensitivity and calling-context-sensitivity:
      matched points-to edges and entry/exit edges
    • Traverses the object nodes (including symbolic
      ones) and the edges between them
                  a      o1           s3     c
                         f               f
                   b    o2              s2      d
                       entry1        exit1
                                s1
                          f, entry1, exit1, f
              o1                                    s3
7
Using Method Summaries
    • Several reachability strings for a selected method
      – Each string is a sequence of field points-to edges
        between boundary objects of the method




8
Using Method Summaries
    • Several reachability strings for a selected method
      – Each string is a sequence of field points-to edges
        between boundary objects of the method
      m(a) {                                  f
                              a         sa          o1       c
        c = new …; // o1                           g
        a.f = c;                                    sg
                                       ret
        return c.g;
      }



8
Using Method Summaries
    • Several reachability strings for a selected method
      – Each string is a sequence of field points-to edges
        between boundary objects of the method
      m(a) {                                   f
                              a         sa          o1       c
        c = new …; // o1                            g
        a.f = c;                                        sg
                                       ret
        return c.g;
      }
                                        f, g
             summary(m):          sa               sg
8
Using Method Summaries
    • Several reachability strings for a selected method
      – Each string is a sequence of field points-to edges
        between boundary objects of the method
    • Selecting methods for summarization
      – Compute a summary for a method only if it is invoked
        from many different call sites




8
Using Method Summaries
    • Several reachability strings for a selected method
      – Each string is a sequence of field points-to edges
        between boundary objects of the method
    • Selecting methods for summarization
      – Compute a summary for a method only if it is invoked
        from many different call sites
      – Summarization ratio for method m
          • the number of incoming call graph edges of m,
            divided by the average number of incoming call
            graph edges for all methods


8
Experimental Evaluation
    • 19 Java programs
      – Number of methods in the whole-program call graph
        ranging from 2344 to 8789
    • Experiment 1: compare the precision with a field
      and context-sensitive, demand-driven, client-
      driven points-to analysis [PLDI’06]
      – Under the same time budget per alias query
      – Result 1: for 14 programs, the number of alias pairs is
        lower when using our analysis
      – Result 2: summarization leads to better precision
    • Experiment 2: compare running times with and
      without method summaries
9
Running Time Reduction When Using
             Method Summaries




     Running Time Reduction = (RTno-summ  RTsumm) / RTno-summ


10
Running Time Reduction When Using
             Method Summaries




     Running Time Reduction = (RTno-summ  RTsumm) / RTno-summ

          24% average reduction with threshold T=2
10
Conclusions
 • A demand-driven alias analysis
     – Answers alias queries directly, without computing the
       complete points-to sets
     – Selects methods for online summarization to reduce
       analysis running time
     – Outperforms a highly precise state-of-the-art points-to
       analysis




11
Thank you


12

Mais conteúdo relacionado

Destaque

テストデータどうしてますか?
テストデータどうしてますか?テストデータどうしてますか?
テストデータどうしてますか?Yuki Shibazaki
 
Cambridge speaking & listening exam entry 1 phase 1a
Cambridge speaking & listening exam entry 1 phase 1aCambridge speaking & listening exam entry 1 phase 1a
Cambridge speaking & listening exam entry 1 phase 1aDawn-Stafford
 
Trinity Conversation Questions
Trinity Conversation QuestionsTrinity Conversation Questions
Trinity Conversation Questionsprofecolaborador
 
Useful phrases for work and everyday life
Useful phrases for work and everyday lifeUseful phrases for work and everyday life
Useful phrases for work and everyday liferaja1910
 
Speaking English (Linking Words)
Speaking English  (Linking Words)Speaking English  (Linking Words)
Speaking English (Linking Words)sandeep J
 
Modern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial DatabasesModern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial DatabasesMarkus Winand
 
PPT ON ENGLISH
PPT ON ENGLISHPPT ON ENGLISH
PPT ON ENGLISHTime Rahul
 
More level-1-students-book
More level-1-students-bookMore level-1-students-book
More level-1-students-booktrung vu
 

Destaque (12)

Blog entry1
Blog entry1Blog entry1
Blog entry1
 
テストデータどうしてますか?
テストデータどうしてますか?テストデータどうしてますか?
テストデータどうしてますか?
 
Cambridge speaking & listening exam entry 1 phase 1a
Cambridge speaking & listening exam entry 1 phase 1aCambridge speaking & listening exam entry 1 phase 1a
Cambridge speaking & listening exam entry 1 phase 1a
 
Trinity Conversation Questions
Trinity Conversation QuestionsTrinity Conversation Questions
Trinity Conversation Questions
 
Tom's TEFL - Time And Daily Routine
Tom's TEFL - Time And Daily RoutineTom's TEFL - Time And Daily Routine
Tom's TEFL - Time And Daily Routine
 
English for everyday activities
English for everyday activitiesEnglish for everyday activities
English for everyday activities
 
Useful phrases for work and everyday life
Useful phrases for work and everyday lifeUseful phrases for work and everyday life
Useful phrases for work and everyday life
 
Speaking English (Linking Words)
Speaking English  (Linking Words)Speaking English  (Linking Words)
Speaking English (Linking Words)
 
English book 1 teacher
English book 1 teacherEnglish book 1 teacher
English book 1 teacher
 
Modern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial DatabasesModern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial Databases
 
PPT ON ENGLISH
PPT ON ENGLISHPPT ON ENGLISH
PPT ON ENGLISH
 
More level-1-students-book
More level-1-students-bookMore level-1-students-book
More level-1-students-book
 

Semelhante a Demand-Driven Context-Sensitive Alias Analysis for Java

Quadratics Final
Quadratics FinalQuadratics Final
Quadratics Finalpelican24
 
Prac 2 rolle's thm
Prac  2 rolle's thmPrac  2 rolle's thm
Prac 2 rolle's thmHimani Asija
 
Uncovering Performance Problems in Java Applications with Reference Propagati...
Uncovering Performance Problems in Java Applications with Reference Propagati...Uncovering Performance Problems in Java Applications with Reference Propagati...
Uncovering Performance Problems in Java Applications with Reference Propagati...Dacong (Tony) Yan
 
Rethinking Soot for Summary-Based Whole-Program Analysis
Rethinking Soot for Summary-Based Whole-Program AnalysisRethinking Soot for Summary-Based Whole-Program Analysis
Rethinking Soot for Summary-Based Whole-Program AnalysisDacong (Tony) Yan
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignKuppusamy P
 
Alg1 power points_-_unit_7_-_exponents_and_exponential_functions
Alg1 power points_-_unit_7_-_exponents_and_exponential_functionsAlg1 power points_-_unit_7_-_exponents_and_exponential_functions
Alg1 power points_-_unit_7_-_exponents_and_exponential_functionsCuteanimeboyWithhood
 
Ap calculus extrema v2
Ap calculus extrema v2Ap calculus extrema v2
Ap calculus extrema v2gregcross22
 
Prac 3 lagrange's thm
Prac  3 lagrange's thmPrac  3 lagrange's thm
Prac 3 lagrange's thmHimani Asija
 
Prac 3 lagrange's thm
Prac  3 lagrange's thmPrac  3 lagrange's thm
Prac 3 lagrange's thmHimani Asija
 
February 10 2016
February 10 2016February 10 2016
February 10 2016khyps13
 
Lecture 12 intermediate code generation
Lecture 12 intermediate code generationLecture 12 intermediate code generation
Lecture 12 intermediate code generationIffat Anjum
 
Parallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-JoinsParallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-JoinsJonny Daenen
 

Semelhante a Demand-Driven Context-Sensitive Alias Analysis for Java (20)

Quadratics Final
Quadratics FinalQuadratics Final
Quadratics Final
 
L4 functions
L4 functionsL4 functions
L4 functions
 
Prac 2 rolle's thm
Prac  2 rolle's thmPrac  2 rolle's thm
Prac 2 rolle's thm
 
Uncovering Performance Problems in Java Applications with Reference Propagati...
Uncovering Performance Problems in Java Applications with Reference Propagati...Uncovering Performance Problems in Java Applications with Reference Propagati...
Uncovering Performance Problems in Java Applications with Reference Propagati...
 
Rethinking Soot for Summary-Based Whole-Program Analysis
Rethinking Soot for Summary-Based Whole-Program AnalysisRethinking Soot for Summary-Based Whole-Program Analysis
Rethinking Soot for Summary-Based Whole-Program Analysis
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler Design
 
Alg1 power points_-_unit_7_-_exponents_and_exponential_functions
Alg1 power points_-_unit_7_-_exponents_and_exponential_functionsAlg1 power points_-_unit_7_-_exponents_and_exponential_functions
Alg1 power points_-_unit_7_-_exponents_and_exponential_functions
 
Ap calculus extrema v2
Ap calculus extrema v2Ap calculus extrema v2
Ap calculus extrema v2
 
3rd Semester Computer Science and Engineering (ACU-2022) Question papers
3rd Semester Computer Science and Engineering  (ACU-2022) Question papers3rd Semester Computer Science and Engineering  (ACU-2022) Question papers
3rd Semester Computer Science and Engineering (ACU-2022) Question papers
 
Prac 3 lagrange's thm
Prac  3 lagrange's thmPrac  3 lagrange's thm
Prac 3 lagrange's thm
 
Prac 3 lagrange's thm
Prac  3 lagrange's thmPrac  3 lagrange's thm
Prac 3 lagrange's thm
 
February 10 2016
February 10 2016February 10 2016
February 10 2016
 
3rd Semester Computer Science and Engineering (ACU) Question papers
3rd Semester Computer Science and Engineering  (ACU) Question papers3rd Semester Computer Science and Engineering  (ACU) Question papers
3rd Semester Computer Science and Engineering (ACU) Question papers
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 
Day 1a examples
Day 1a examplesDay 1a examples
Day 1a examples
 
Lecture 12 intermediate code generation
Lecture 12 intermediate code generationLecture 12 intermediate code generation
Lecture 12 intermediate code generation
 
Quadratics
QuadraticsQuadratics
Quadratics
 
Parallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-JoinsParallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-Joins
 
18560 lecture6
18560 lecture618560 lecture6
18560 lecture6
 
Lecture04
Lecture04Lecture04
Lecture04
 

Mais de Dacong (Tony) Yan

Static Reference Analysis for GUI Objects in Android Software
Static Reference Analysis for GUI Objects in Android SoftwareStatic Reference Analysis for GUI Objects in Android Software
Static Reference Analysis for GUI Objects in Android SoftwareDacong (Tony) Yan
 
LeakChecker: Practical Static Memory Leak Detection for Managed Languages
LeakChecker: Practical Static Memory Leak Detection for Managed LanguagesLeakChecker: Practical Static Memory Leak Detection for Managed Languages
LeakChecker: Practical Static Memory Leak Detection for Managed LanguagesDacong (Tony) Yan
 
Systematic Testing for Resource Leaks in Android Applications
Systematic Testing for Resource Leaks in Android ApplicationsSystematic Testing for Resource Leaks in Android Applications
Systematic Testing for Resource Leaks in Android ApplicationsDacong (Tony) Yan
 
SherLog: Error Diagnosis by Connecting Clues from Run-time Logs
SherLog: Error Diagnosis by Connecting Clues from Run-time LogsSherLog: Error Diagnosis by Connecting Clues from Run-time Logs
SherLog: Error Diagnosis by Connecting Clues from Run-time LogsDacong (Tony) Yan
 
Efficient Diversity-Aware Search
Efficient Diversity-Aware SearchEfficient Diversity-Aware Search
Efficient Diversity-Aware SearchDacong (Tony) Yan
 
A Toy Virtual Machine Project
A Toy Virtual Machine ProjectA Toy Virtual Machine Project
A Toy Virtual Machine ProjectDacong (Tony) Yan
 

Mais de Dacong (Tony) Yan (8)

Static Reference Analysis for GUI Objects in Android Software
Static Reference Analysis for GUI Objects in Android SoftwareStatic Reference Analysis for GUI Objects in Android Software
Static Reference Analysis for GUI Objects in Android Software
 
LeakChecker: Practical Static Memory Leak Detection for Managed Languages
LeakChecker: Practical Static Memory Leak Detection for Managed LanguagesLeakChecker: Practical Static Memory Leak Detection for Managed Languages
LeakChecker: Practical Static Memory Leak Detection for Managed Languages
 
Systematic Testing for Resource Leaks in Android Applications
Systematic Testing for Resource Leaks in Android ApplicationsSystematic Testing for Resource Leaks in Android Applications
Systematic Testing for Resource Leaks in Android Applications
 
SherLog: Error Diagnosis by Connecting Clues from Run-time Logs
SherLog: Error Diagnosis by Connecting Clues from Run-time LogsSherLog: Error Diagnosis by Connecting Clues from Run-time Logs
SherLog: Error Diagnosis by Connecting Clues from Run-time Logs
 
Efficient Diversity-Aware Search
Efficient Diversity-Aware SearchEfficient Diversity-Aware Search
Efficient Diversity-Aware Search
 
AVIO class present
AVIO class presentAVIO class present
AVIO class present
 
A Toy Virtual Machine Project
A Toy Virtual Machine ProjectA Toy Virtual Machine Project
A Toy Virtual Machine Project
 
Scope vs YSmart
Scope vs YSmartScope vs YSmart
Scope vs YSmart
 

Último

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Demand-Driven Context-Sensitive Alias Analysis for Java

  • 1. Demand-Driven Context-Sensitive Alias Analysis for Java Dacong (Tony) Yan Guoqing (Harry) Xu Atanas Rountev Ohio State University PRESTO: Program Analyses and Software Tools Research Group, Ohio State University
  • 2. Alias Analysis • Many static analysis tools need highly precise and efficiently-computed alias information • Desirable properties – Demand-driven: query “could x and y alias?” – Client-driven: client-defined time budget for a query • Typical solution: use points-to analysis – Compute the objects that x may point to; same for y; are there common objects? • Goal: answer alias queries precisely and efficiently, without computing the complete points-to sets 2
  • 4. Redundancy in Points-to Analysis m(a) { b = a; x = a.f; y = b.f; } 3
  • 5. Redundancy in Points-to Analysis m(a) { b = a; x = a.f; y = b.f; alias? x y } 3
  • 6. Redundancy in Points-to Analysis m(a) { O b = a; points-to? points-to? x = a.f; y = b.f; alias? x y } 3
  • 7. Redundancy in Points-to Analysis m(a) { b = a; x = a.f; y = b.f; f f x a b y } 3
  • 8. Redundancy in Points-to Analysis m(a) { b = a; x = a.f; y = b.f; f alias? f x a b y } 3
  • 9. Redundancy in Points-to Analysis m(a) { b = a; O x = a.f; points-to? points-to? y = b.f; f alias? f x a b y } 3
  • 10. Redundancy in Points-to Analysis m(a) { b = a; x = a.f; y = b.f; alias f f x a b y } 3
  • 11. Redundancy in Points-to Analysis m(a) { b = a; x = a.f; y = b.f; alias f f x a b y } alias 3
  • 12. Our Approach • Alias analysis – Demand-driven and client-driven – Field-sensitive and calling-context-sensitive – Does not require complete points-to set computation – Better performance through method summaries • Symbolic Points-to Graph – A specialized program representation that enables the demand-driven alias analysis – Facilitates computation and use of method summaries 4
  • 13. Program Representation • Intraprocedural Symbolic Points-To Graph – Introduce a symbolic object node s for each • formal parameter • field read a.fld • a call site that returns a reference-typed value – Compute intraprocedural points-to relationships m(a) { c = new …; // o1 a sa o1 c f g a.f = c; return c.g; ret sg } 5
  • 14. Interprocedural Symbolic Points-To Graph • Connect the intraprocedural graphs using entry and exit edges 6
  • 15. Interprocedural Symbolic Points-To Graph • Connect the intraprocedural graphs using entry and exit edges m(a) { c = new …; // o1 a.f = c; return c.g; } 6
  • 16. Interprocedural Symbolic Points-To Graph • Connect the intraprocedural graphs using entry and exit edges m(a) { f a sa o1 c c = new …; // o1 g a.f = c; ret sg return c.g; } 6
  • 17. Interprocedural Symbolic Points-To Graph • Connect the intraprocedural graphs using entry and exit edges m(a) { f a sa o1 c c = new …; // o1 g a.f = c; ret sg return c.g; } d = new …; // o2 b = m(d); // call m 6
  • 18. Interprocedural Symbolic Points-To Graph • Connect the intraprocedural graphs using entry and exit edges m(a) { f a sa o1 c c = new …; // o1 g a.f = c; ret sg return c.g; } o2 d d = new …; // o2 b sm b = m(d); // call m 6
  • 19. Interprocedural Symbolic Points-To Graph • Connect the intraprocedural graphs using entry and exit edges m(a) { f a sa o1 c c = new …; // o1 g a.f = c; entrym ret sg return c.g; exitm } o2 d d = new …; // o2 b sm b = m(d); // call m 6
  • 20. Alias Analysis Formulation • Field-sensitivity and calling-context-sensitivity: matched points-to edges and entry/exit edges • Traverses the object nodes (including symbolic ones) and the edges between them 7
  • 21. Alias Analysis Formulation • Field-sensitivity and calling-context-sensitivity: matched points-to edges and entry/exit edges • Traverses the object nodes (including symbolic ones) and the edges between them a o1 s3 c f f b o2 s2 d entry1 exit1 s1 7
  • 22. Alias Analysis Formulation • Field-sensitivity and calling-context-sensitivity: matched points-to edges and entry/exit edges • Traverses the object nodes (including symbolic ones) and the edges between them a o1 s3 c f f b o2 s2 d entry1 exit1 s1 7 a alias? c
  • 23. Alias Analysis Formulation • Field-sensitivity and calling-context-sensitivity: matched points-to edges and entry/exit edges • Traverses the object nodes (including symbolic ones) and the edges between them a o1 s3 c f f b o2 s2 d entry1 exit1 s1 may represent the o1 s3 7 same concrete object?
  • 24. Alias Analysis Formulation • Field-sensitivity and calling-context-sensitivity: matched points-to edges and entry/exit edges • Traverses the object nodes (including symbolic ones) and the edges between them a o1 s3 c f f b o2 s2 d entry1 exit1 s1 o1 f o2 s3 7
  • 25. Alias Analysis Formulation • Field-sensitivity and calling-context-sensitivity: matched points-to edges and entry/exit edges • Traverses the object nodes (including symbolic ones) and the edges between them a o1 s3 c f f b o2 s2 d entry1 exit1 s1 o1 f o entry1 s s3 2 1 7
  • 26. Alias Analysis Formulation • Field-sensitivity and calling-context-sensitivity: matched points-to edges and entry/exit edges • Traverses the object nodes (including symbolic ones) and the edges between them a o1 s3 c f f b o2 s2 d entry1 exit1 s1 o1 f o entry1 s exit1 s s3 2 1 2 7
  • 27. Alias Analysis Formulation • Field-sensitivity and calling-context-sensitivity: matched points-to edges and entry/exit edges • Traverses the object nodes (including symbolic ones) and the edges between them a o1 s3 c f f b o2 s2 d entry1 exit1 s1 f o entry1, exit1 o1 2 s2 s3 7
  • 28. Alias Analysis Formulation • Field-sensitivity and calling-context-sensitivity: matched points-to edges and entry/exit edges • Traverses the object nodes (including symbolic ones) and the edges between them a o1 s3 c f f b o2 s2 d entry1 exit1 s1 f o entry1, exit1 o1 2 s2 f s3 7
  • 29. Alias Analysis Formulation • Field-sensitivity and calling-context-sensitivity: matched points-to edges and entry/exit edges • Traverses the object nodes (including symbolic ones) and the edges between them a o1 s3 c f f b o2 s2 d entry1 exit1 s1 f, entry1, exit1, f o1 s3 7
  • 30. Using Method Summaries • Several reachability strings for a selected method – Each string is a sequence of field points-to edges between boundary objects of the method 8
  • 31. Using Method Summaries • Several reachability strings for a selected method – Each string is a sequence of field points-to edges between boundary objects of the method m(a) { f a sa o1 c c = new …; // o1 g a.f = c; sg ret return c.g; } 8
  • 32. Using Method Summaries • Several reachability strings for a selected method – Each string is a sequence of field points-to edges between boundary objects of the method m(a) { f a sa o1 c c = new …; // o1 g a.f = c; sg ret return c.g; } f, g summary(m): sa sg 8
  • 33. Using Method Summaries • Several reachability strings for a selected method – Each string is a sequence of field points-to edges between boundary objects of the method • Selecting methods for summarization – Compute a summary for a method only if it is invoked from many different call sites 8
  • 34. Using Method Summaries • Several reachability strings for a selected method – Each string is a sequence of field points-to edges between boundary objects of the method • Selecting methods for summarization – Compute a summary for a method only if it is invoked from many different call sites – Summarization ratio for method m • the number of incoming call graph edges of m, divided by the average number of incoming call graph edges for all methods 8
  • 35. Experimental Evaluation • 19 Java programs – Number of methods in the whole-program call graph ranging from 2344 to 8789 • Experiment 1: compare the precision with a field and context-sensitive, demand-driven, client- driven points-to analysis [PLDI’06] – Under the same time budget per alias query – Result 1: for 14 programs, the number of alias pairs is lower when using our analysis – Result 2: summarization leads to better precision • Experiment 2: compare running times with and without method summaries 9
  • 36. Running Time Reduction When Using Method Summaries Running Time Reduction = (RTno-summ  RTsumm) / RTno-summ 10
  • 37. Running Time Reduction When Using Method Summaries Running Time Reduction = (RTno-summ  RTsumm) / RTno-summ 24% average reduction with threshold T=2 10
  • 38. Conclusions • A demand-driven alias analysis – Answers alias queries directly, without computing the complete points-to sets – Selects methods for online summarization to reduce analysis running time – Outperforms a highly precise state-of-the-art points-to analysis 11