Pointer and Shape Analysis Seminar http://www.cs.tau.ac.il/~msagiv/courses/shape.html - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

Pointer and Shape Analysis Seminar http://www.cs.tau.ac.il/~msagiv/courses/shape.html

Description:

Statically analyze the program text (w/o input) ... Don't get bogged down in Details. The best talk make you read the paper. Structure your talk ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 34
Provided by: csta3
Category:

less

Transcript and Presenter's Notes

Title: Pointer and Shape Analysis Seminar http://www.cs.tau.ac.il/~msagiv/courses/shape.html


1
Pointer and Shape Analysis Seminarhttp//www.cs.t
au.ac.il/msagiv/courses/shape.html
  • Mooly Sagiv
  • Schriber 317
  • msagiv_at_post
  • Office Hours Thursday 15-16

2
Outline
  1. General information
  2. Seminar subject
  3. How to give a presentation

3
General Information
  • Prerequisites
  • Compilers Program Analysis
  • Select 3 topics by Sunday
  • Participate in 9 seminar talks
  • Present a paper

4
Tentative Schedule
  • Today Intro
  • Sunday (selection of topic)
  • Student lectures

5
Pointer and Shape Analysis
6
Program Analysis
  • Statically analyze the program text (w/o input)
  • Determine conservative information about all
    (some) program executions
  • Applications
  • Verification
  • Each verified property holds but not all
    properties can be verified all programs
  • False alarms
  • Compiler optimizations
  • Parallelizations
  • Garbage collection

7
Alias Analysis
  • Two expressions referring to the same memory
    location at a given program point on some (all)
    executions

1 p a 2 q b 3 if (getc()) 4
q c 5
q ? b
p ? a
q ? c
8
Points-To Analysis
  • Determine if a variable points to a variable at
    some (all) execution paths

1 p a 2 q b 3 if (getc()) 4
q c 5
q ?? b
p ?? a
q ?? c
9
Shape Analysis
  • Determine the potential shapes of memory at a
    given program point

1 p a 2 q b 3 if (getc()) 4
q c
10
Applications
  • Adapt other optimizations
  • Constant propagationx 5p 7 x
  • Side-effect analysis p q t
  • Verification
  • No null dereferences
  • No memory leaks

11
Iterative Program Analysis
  • Start by optimistically assuming that nothing is
    wrong
  • No aliases
  • No points-to set
  • Empty sets of shape graphs
  • At every iteration apply the abstract meaning of
    programming language statements and add more
    aliases/points-to/shape graphs
  • Stop when no changes occur

12
Iterative Points-to Analysis
t a
t?a
y b
t?a, y?b
z c
t?a, y?b, z ?c
p t
t?a, y?b, z ?c
t?a, y?b, z ?c
p y
p z
t?a, y?b, z ?c, p?y
t?a, y?b, z ?c, p?z
t?a, y?b, z ?c, p?y, p?z
13
Iterative Points-to Analysis
t a
t?a
y b
t?a, y?b
z c
t?a, y?b, z ?c, p?y, p?z
p t
t?a, y?b, z ?c, p?y, p?z, y?a, z?a
t?a, y?b, z ?c, p?y, p?z, y?a, z?a
p y
p z
t?a, y?b, z ?c, p?y
t?a, y?b, z ?c, p?z
t?a, y?b, z ?c, p?y, p?z
14
Iterative Points-to Analysis
t a
t?a
y b
t?a, y?b
z c
t?a, y?b, z ?c, p?y, p?z
p t
t?a, y?b, z ?c, p?y, p?z, y?a, z?a
t?a, y?b, z ?c, p?y, p?z, y?a, z?a
p y
p z
t?a, y?b, z ?c, p?y, y?a, z?a
t?a, y?b, z ?c, p?z, y?a, z?a
t?a, y?b, z ?c, p?y, p?z
15
Iterative Points-to Analysis
t a
t?a
y b
t?a, y?b
z c
t?a, y?b, z ?c, p?y, p?z, y?a, z?a
p t
t?a, y?b, z ?c, p?y, p?z, y?a, z?a
t?a, y?b, z ?c, p?y, p?z, y?a, z?a
p y
p z
t?a, y?b, z ?c, p?y, y?a, z?a
t?a, y?b, z ?c, p?z, y?a, z?a
t?a, y?b, z ?c, p?y, p?z, y?a, z?a
16
Iterative Shape Analysis
17
Soundness
  • Every alias is detected
  • Every points-to fact is detected
  • Every potential shape is detected
  • Every potential bug is detected
  • Every enabled optimization is correct

18
Dimensions of program analysis
  • Flow sensitive
  • Context sensitive

19
Material on Pointer Analysis
  • Alias Analysis
  • Points-to Analysis
  • Shape Analysis
  • Applications

20
Giving a presentation
  • Ian Parbery

21
How to give a presentation
  • What to say and how to say it
  • Getting through the audience
  • Visual aids

22
What to say and how to say it
  • Communicate the Key Ideas
  • Dont get bogged down in Details
  • The best talk make you read the paper
  • Structure your talk
  • Use Top-Down approach
  • Introduction
  • Body
  • Technicalities
  • The Conclusion

Use Examples
23
Introduction
  • Define the problem
  • Motivate the audience
  • Introduce terminology
  • Discuss earlier work
  • Emphasize the contributions
  • Provide a road map

Use Examples
24
The body
  • Abstract the major results
  • Explain the significance of the results
  • Explain the main techniques
  • Use enlightening examples
  • Demonstrations are welcome

25
Technicalities
  • Expert only part
  • Show something really interesting beyond the
    paper/tool

26
The Conclusion
  • Hindsight is clearer than Foresight
  • Give open problems/further work
  • Indicate that your talk is over

27
Know your audience
  • Background

28
Getting through the Audience
  • Use Repetitions
  • Remind, dont assume
  • Dont over-run
  • Maintain Eye Contact
  • Control your voice
  • Control your motion
  • Take care of your appearance

29
Visual Aids
  • PowerPoint transparencies
  • Dont overload transparencies
  • Dont use too many transparencies
  • Use Overlays Properly
  • Use Color Effectively
  • Use Pictures and Tables
  • The blackboard can be used too

30
Dont overload transparencies
  • The input of the program can be arbitrary.
  • Let x be a prime number, i.e., all the numbers
    zltx do not divide x. y be the next prime number,
    i.e., etc.
  • Arbitrary input
  • Prime number x
  • The next prime y

31
Use overlays (im)properly
  • Item 1
  • Item 1.1
  • Item 1.2
  • Item 2
  • Item 2.1
  • Item 2.1.1

32
Use colors properly
  • Item 1
  • Item 2
  • Item 3

33
The End
http//www.cs.tau.ac.il/msagiv/courses/shape.html
Write a Comment
User Comments (0)
About PowerShow.com