Demand-Driven Context-Sensitive Alias Analysis for Java

Dacong (Tony) Yan
Dacong (Tony) YanSoftware Engineer em Google
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
1 de 39

Recomendados

Siggraph2016 - The Devil is in the Details: idTech 666 por
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Tiago Sousa
7.1K visualizações58 slides
Introduction to TensorFlow 2.0 por
Introduction to TensorFlow 2.0Introduction to TensorFlow 2.0
Introduction to TensorFlow 2.0Databricks
5.8K visualizações80 slides
Optimization for Deep Learning por
Optimization for Deep LearningOptimization for Deep Learning
Optimization for Deep LearningSebastian Ruder
30.6K visualizações49 slides
PR-270: PP-YOLO: An Effective and Efficient Implementation of Object Detector por
PR-270: PP-YOLO: An Effective and Efficient Implementation of Object DetectorPR-270: PP-YOLO: An Effective and Efficient Implementation of Object Detector
PR-270: PP-YOLO: An Effective and Efficient Implementation of Object DetectorJinwon Lee
1K visualizações36 slides
Forward+ (EUROGRAPHICS 2012) por
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Takahiro Harada
38.6K visualizações21 slides
Cascades Demo Secrets por
Cascades Demo SecretsCascades Demo Secrets
Cascades Demo Secretsicastano
8.3K visualizações148 slides

Mais conteúdo relacionado

Mais procurados

07 dimensionality reduction por
07 dimensionality reduction07 dimensionality reduction
07 dimensionality reductionMarco Quartulli
947 visualizações31 slides
Past, Present & Future of Recommender Systems: An Industry Perspective por
Past, Present & Future of Recommender Systems: An Industry PerspectivePast, Present & Future of Recommender Systems: An Industry Perspective
Past, Present & Future of Recommender Systems: An Industry PerspectiveJustin Basilico
65K visualizações20 slides
Neural Learning to Rank por
Neural Learning to RankNeural Learning to Rank
Neural Learning to RankBhaskar Mitra
104 visualizações44 slides
Introduction to batch normalization por
Introduction to batch normalizationIntroduction to batch normalization
Introduction to batch normalizationTaka Wang
131 visualizações26 slides
2021 05-04-u2-net por
2021 05-04-u2-net2021 05-04-u2-net
2021 05-04-u2-netJAEMINJEONG5
659 visualizações26 slides
End-to-End Object Detection with Transformers por
End-to-End Object Detection with TransformersEnd-to-End Object Detection with Transformers
End-to-End Object Detection with TransformersSeunghyun Hwang
1.1K visualizações21 slides

Mais procurados(20)

07 dimensionality reduction por Marco Quartulli
07 dimensionality reduction07 dimensionality reduction
07 dimensionality reduction
Marco Quartulli947 visualizações
Past, Present & Future of Recommender Systems: An Industry Perspective por Justin Basilico
Past, Present & Future of Recommender Systems: An Industry PerspectivePast, Present & Future of Recommender Systems: An Industry Perspective
Past, Present & Future of Recommender Systems: An Industry Perspective
Justin Basilico65K visualizações
Neural Learning to Rank por Bhaskar Mitra
Neural Learning to RankNeural Learning to Rank
Neural Learning to Rank
Bhaskar Mitra104 visualizações
Introduction to batch normalization por Taka Wang
Introduction to batch normalizationIntroduction to batch normalization
Introduction to batch normalization
Taka Wang131 visualizações
2021 05-04-u2-net por JAEMINJEONG5
2021 05-04-u2-net2021 05-04-u2-net
2021 05-04-u2-net
JAEMINJEONG5659 visualizações
End-to-End Object Detection with Transformers por Seunghyun Hwang
End-to-End Object Detection with TransformersEnd-to-End Object Detection with Transformers
End-to-End Object Detection with Transformers
Seunghyun Hwang1.1K visualizações
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014) por Philip Hammer
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
Philip Hammer7.3K visualizações
Feature selection por Dong Guo
Feature selectionFeature selection
Feature selection
Dong Guo14.1K visualizações
The Rendering Pipeline - Challenges & Next Steps por Johan Andersson
The Rendering Pipeline - Challenges & Next StepsThe Rendering Pipeline - Challenges & Next Steps
The Rendering Pipeline - Challenges & Next Steps
Johan Andersson101.1K visualizações
Machine learning por vaishnavip23
Machine learningMachine learning
Machine learning
vaishnavip23111 visualizações
Parallelizing Conqueror's Blade por Intel® Software
Parallelizing Conqueror's BladeParallelizing Conqueror's Blade
Parallelizing Conqueror's Blade
Intel® Software2.6K visualizações
Recommender systems: Content-based and collaborative filtering por Viet-Trung TRAN
Recommender systems: Content-based and collaborative filteringRecommender systems: Content-based and collaborative filtering
Recommender systems: Content-based and collaborative filtering
Viet-Trung TRAN11.4K visualizações
Graph Convolutional Neural Networks por 신동 강
Graph Convolutional Neural Networks Graph Convolutional Neural Networks
Graph Convolutional Neural Networks
신동 강5.4K visualizações
Evolutionary Computing por Madhawa Gunasekara
Evolutionary ComputingEvolutionary Computing
Evolutionary Computing
Madhawa Gunasekara2.2K visualizações
Deep Learning for Personalized Search and Recommender Systems por Benjamin Le
Deep Learning for Personalized Search and Recommender SystemsDeep Learning for Personalized Search and Recommender Systems
Deep Learning for Personalized Search and Recommender Systems
Benjamin Le37.4K visualizações
Dx11 performancereloaded por mistercteam
Dx11 performancereloadedDx11 performancereloaded
Dx11 performancereloaded
mistercteam5.5K visualizações
A Comparison of Loss Function on Deep Embedding por Cenk Bircanoğlu
A Comparison of Loss Function on Deep EmbeddingA Comparison of Loss Function on Deep Embedding
A Comparison of Loss Function on Deep Embedding
Cenk Bircanoğlu5.3K visualizações
Introduction to Machine Learning por Shao-Chuan Wang
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
Shao-Chuan Wang3.9K visualizações
Natural Language Processing with Graph Databases and Neo4j por William Lyon
Natural Language Processing with Graph Databases and Neo4jNatural Language Processing with Graph Databases and Neo4j
Natural Language Processing with Graph Databases and Neo4j
William Lyon15.5K visualizações
Holy smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas por AMD Developer Central
Holy smoke! Faster Particle Rendering using Direct Compute by Gareth ThomasHoly smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas
Holy smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas
AMD Developer Central 15.2K visualizações

Destaque

Blog entry1 por
Blog entry1Blog entry1
Blog entry1Fex Orumwense
215 visualizações3 slides
テストデータどうしてますか? por
テストデータどうしてますか?テストデータどうしてますか?
テストデータどうしてますか?Yuki Shibazaki
2.1K visualizações36 slides
Cambridge speaking & listening exam entry 1 phase 1a por
Cambridge speaking & listening exam entry 1 phase 1aCambridge speaking & listening exam entry 1 phase 1a
Cambridge speaking & listening exam entry 1 phase 1aDawn-Stafford
2.3K visualizações42 slides
Trinity Conversation Questions por
Trinity Conversation QuestionsTrinity Conversation Questions
Trinity Conversation Questionsprofecolaborador
55.3K visualizações7 slides
Tom's TEFL - Time And Daily Routine por
Tom's TEFL - Time And Daily RoutineTom's TEFL - Time And Daily Routine
Tom's TEFL - Time And Daily RoutineHong Kong Primary School
10.4K visualizações53 slides
English for everyday activities por
English for everyday activitiesEnglish for everyday activities
English for everyday activitiesGan-Od Baasantseren
60.4K visualizações78 slides

Destaque(12)

Blog entry1 por Fex Orumwense
Blog entry1Blog entry1
Blog entry1
Fex Orumwense215 visualizações
テストデータどうしてますか? por Yuki Shibazaki
テストデータどうしてますか?テストデータどうしてますか?
テストデータどうしてますか?
Yuki Shibazaki2.1K visualizações
Cambridge speaking & listening exam entry 1 phase 1a por Dawn-Stafford
Cambridge speaking & listening exam entry 1 phase 1aCambridge speaking & listening exam entry 1 phase 1a
Cambridge speaking & listening exam entry 1 phase 1a
Dawn-Stafford2.3K visualizações
Trinity Conversation Questions por profecolaborador
Trinity Conversation QuestionsTrinity Conversation Questions
Trinity Conversation Questions
profecolaborador55.3K visualizações
Tom's TEFL - Time And Daily Routine por Hong Kong Primary School
Tom's TEFL - Time And Daily RoutineTom's TEFL - Time And Daily Routine
Tom's TEFL - Time And Daily Routine
Hong Kong Primary School10.4K visualizações
English for everyday activities por Gan-Od Baasantseren
English for everyday activitiesEnglish for everyday activities
English for everyday activities
Gan-Od Baasantseren60.4K visualizações
Useful phrases for work and everyday life por raja1910
Useful phrases for work and everyday lifeUseful phrases for work and everyday life
Useful phrases for work and everyday life
raja1910102.9K visualizações
Speaking English (Linking Words) por sandeep J
Speaking English  (Linking Words)Speaking English  (Linking Words)
Speaking English (Linking Words)
sandeep J75.7K visualizações
English book 1 teacher por Gabriel Guerrón
English book 1 teacherEnglish book 1 teacher
English book 1 teacher
Gabriel Guerrón17K visualizações
Modern SQL in Open Source and Commercial Databases por Markus Winand
Modern SQL in Open Source and Commercial DatabasesModern SQL in Open Source and Commercial Databases
Modern SQL in Open Source and Commercial Databases
Markus Winand450.8K visualizações
PPT ON ENGLISH por Time Rahul
PPT ON ENGLISHPPT ON ENGLISH
PPT ON ENGLISH
Time Rahul301.9K visualizações
More level-1-students-book por trung vu
More level-1-students-bookMore level-1-students-book
More level-1-students-book
trung vu41.3K visualizações

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

Quadratics Final por
Quadratics FinalQuadratics Final
Quadratics Finalpelican24
349 visualizações6 slides
L4 functions por
L4 functionsL4 functions
L4 functionsmondalakash2012
351 visualizações47 slides
Prac 2 rolle's thm por
Prac  2 rolle's thmPrac  2 rolle's thm
Prac 2 rolle's thmHimani Asija
1.8K visualizações5 slides
Uncovering Performance Problems in Java Applications with Reference Propagati... por
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
304 visualizações28 slides
Rethinking Soot for Summary-Based Whole-Program Analysis por
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
302 visualizações13 slides
Intermediate code generation in Compiler Design por
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignKuppusamy P
839 visualizações52 slides

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

Quadratics Final por pelican24
Quadratics FinalQuadratics Final
Quadratics Final
pelican24349 visualizações
L4 functions por mondalakash2012
L4 functionsL4 functions
L4 functions
mondalakash2012351 visualizações
Prac 2 rolle's thm por Himani Asija
Prac  2 rolle's thmPrac  2 rolle's thm
Prac 2 rolle's thm
Himani Asija1.8K visualizações
Uncovering Performance Problems in Java Applications with Reference Propagati... por Dacong (Tony) Yan
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) Yan304 visualizações
Rethinking Soot for Summary-Based Whole-Program Analysis por Dacong (Tony) Yan
Rethinking Soot for Summary-Based Whole-Program AnalysisRethinking Soot for Summary-Based Whole-Program Analysis
Rethinking Soot for Summary-Based Whole-Program Analysis
Dacong (Tony) Yan302 visualizações
Intermediate code generation in Compiler Design por Kuppusamy P
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler Design
Kuppusamy P839 visualizações
Alg1 power points_-_unit_7_-_exponents_and_exponential_functions por CuteanimeboyWithhood
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
CuteanimeboyWithhood79 visualizações
Ap calculus extrema v2 por gregcross22
Ap calculus extrema v2Ap calculus extrema v2
Ap calculus extrema v2
gregcross221.2K visualizações
Prac 3 lagrange's thm por Himani Asija
Prac  3 lagrange's thmPrac  3 lagrange's thm
Prac 3 lagrange's thm
Himani Asija449 visualizações
Prac 3 lagrange's thm por Himani Asija
Prac  3 lagrange's thmPrac  3 lagrange's thm
Prac 3 lagrange's thm
Himani Asija87 visualizações
February 10 2016 por khyps13
February 10 2016February 10 2016
February 10 2016
khyps13185 visualizações
Day 1a examples por jchartiersjsd
Day 1a examplesDay 1a examples
Day 1a examples
jchartiersjsd199 visualizações
Lecture 12 intermediate code generation por Iffat Anjum
Lecture 12 intermediate code generationLecture 12 intermediate code generation
Lecture 12 intermediate code generation
Iffat Anjum9.5K visualizações
Quadratics por pelican24
QuadraticsQuadratics
Quadratics
pelican24972 visualizações
Parallel Evaluation of Multi-Semi-Joins por Jonny Daenen
Parallel Evaluation of Multi-Semi-JoinsParallel Evaluation of Multi-Semi-Joins
Parallel Evaluation of Multi-Semi-Joins
Jonny Daenen315 visualizações
Lecture04 por sean chen
Lecture04Lecture04
Lecture04
sean chen301 visualizações

Mais de Dacong (Tony) Yan

Static Reference Analysis for GUI Objects in Android Software por
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
711 visualizações45 slides
LeakChecker: Practical Static Memory Leak Detection for Managed Languages por
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
716 visualizações40 slides
Systematic Testing for Resource Leaks in Android Applications por
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
1K visualizações26 slides
SherLog: Error Diagnosis by Connecting Clues from Run-time Logs por
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
2K visualizações19 slides
Efficient Diversity-Aware Search por
Efficient Diversity-Aware SearchEfficient Diversity-Aware Search
Efficient Diversity-Aware SearchDacong (Tony) Yan
389 visualizações43 slides
AVIO class present por
AVIO class presentAVIO class present
AVIO class presentDacong (Tony) Yan
294 visualizações37 slides

Mais de Dacong (Tony) Yan(8)

Static Reference Analysis for GUI Objects in Android Software por Dacong (Tony) Yan
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
Dacong (Tony) Yan711 visualizações
LeakChecker: Practical Static Memory Leak Detection for Managed Languages por Dacong (Tony) Yan
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
Dacong (Tony) Yan716 visualizações
Systematic Testing for Resource Leaks in Android Applications por Dacong (Tony) Yan
Systematic Testing for Resource Leaks in Android ApplicationsSystematic Testing for Resource Leaks in Android Applications
Systematic Testing for Resource Leaks in Android Applications
Dacong (Tony) Yan1K visualizações
SherLog: Error Diagnosis by Connecting Clues from Run-time Logs por Dacong (Tony) Yan
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
Dacong (Tony) Yan2K visualizações
Efficient Diversity-Aware Search por Dacong (Tony) Yan
Efficient Diversity-Aware SearchEfficient Diversity-Aware Search
Efficient Diversity-Aware Search
Dacong (Tony) Yan389 visualizações
AVIO class present por Dacong (Tony) Yan
AVIO class presentAVIO class present
AVIO class present
Dacong (Tony) Yan294 visualizações
A Toy Virtual Machine Project por Dacong (Tony) Yan
A Toy Virtual Machine ProjectA Toy Virtual Machine Project
A Toy Virtual Machine Project
Dacong (Tony) Yan598 visualizações
Scope vs YSmart por Dacong (Tony) Yan
Scope vs YSmartScope vs YSmart
Scope vs YSmart
Dacong (Tony) Yan355 visualizações

Último

Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... por
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...The Digital Insurer
24 visualizações52 slides
PRODUCT LISTING.pptx por
PRODUCT LISTING.pptxPRODUCT LISTING.pptx
PRODUCT LISTING.pptxangelicacueva6
18 visualizações1 slide
20231123_Camunda Meetup Vienna.pdf por
20231123_Camunda Meetup Vienna.pdf20231123_Camunda Meetup Vienna.pdf
20231123_Camunda Meetup Vienna.pdfPhactum Softwareentwicklung GmbH
45 visualizações73 slides
SAP Automation Using Bar Code and FIORI.pdf por
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdfVirendra Rai, PMP
25 visualizações38 slides
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 por
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院IttrainingIttraining
69 visualizações8 slides
"Node.js Development in 2024: trends and tools", Nikita Galkin por
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin Fwdays
17 visualizações38 slides

Último(20)

Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... por The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
The Digital Insurer24 visualizações
PRODUCT LISTING.pptx por angelicacueva6
PRODUCT LISTING.pptxPRODUCT LISTING.pptx
PRODUCT LISTING.pptx
angelicacueva618 visualizações
SAP Automation Using Bar Code and FIORI.pdf por Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Virendra Rai, PMP25 visualizações
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 por IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
IttrainingIttraining69 visualizações
"Node.js Development in 2024: trends and tools", Nikita Galkin por Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays17 visualizações
Scaling Knowledge Graph Architectures with AI por Enterprise Knowledge
Scaling Knowledge Graph Architectures with AIScaling Knowledge Graph Architectures with AI
Scaling Knowledge Graph Architectures with AI
Enterprise Knowledge50 visualizações
Ransomware is Knocking your Door_Final.pdf por Security Bootcamp
Ransomware is Knocking your Door_Final.pdfRansomware is Knocking your Door_Final.pdf
Ransomware is Knocking your Door_Final.pdf
Security Bootcamp66 visualizações
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe por Simone Puorto
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
Simone Puorto13 visualizações
"Running students' code in isolation. The hard way", Yurii Holiuk por Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays24 visualizações
Data Integrity for Banking and Financial Services por Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely29 visualizações
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... por TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc72 visualizações
Democratising digital commerce in India-Report por Kapil Khandelwal (KK)
Democratising digital commerce in India-ReportDemocratising digital commerce in India-Report
Democratising digital commerce in India-Report
Kapil Khandelwal (KK)20 visualizações
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf por Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
Dr. Jimmy Schwarzkopf24 visualizações
STPI OctaNE CoE Brochure.pdf por madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 visualizações
Network Source of Truth and Infrastructure as Code revisited por Network Automation Forum
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisited
Network Automation Forum32 visualizações
Uni Systems for Power Platform.pptx por Uni Systems S.M.S.A.
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptx
Uni Systems S.M.S.A.58 visualizações
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive por Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Network Automation Forum43 visualizações
Melek BEN MAHMOUD.pdf por MelekBenMahmoud
Melek BEN MAHMOUD.pdfMelek BEN MAHMOUD.pdf
Melek BEN MAHMOUD.pdf
MelekBenMahmoud17 visualizações

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