{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

points_to_by_type_inference_slides

points_to_by_type_inference_slides - Points-to Analysis by...

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Points-to Analysis by Type Inference of Programs with Structures and Unions Bjarne Steensgaard
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Language S ::= x = S y | x = S &y | x = S *y | x = S allocate(y) | x = S op(y 1 …y n ) | x = S &y->n | x = S fun(f 1 …f n )->(r 1 …r m ) S* | x 1 …x m = S1…Sm p(y 1 …y n )
Image of page 2
Types τ ::= | simple ( α , λ ,s,p) | struct struct (m,s,p) | object object object object ( α , λ ,s,p) | blank blank (s,p) Tracking Size s = SIZE | Offset α=τ×ο Struct elements m = [ID τ ] map Inconsistent usage
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Types object simple struct struct blank 1 ×ο 1 29 2 ×ο 2 29 s a S b Partial ordering tracks information flow between assigned-from location and assigned-to location. Sizes and offsets must be accommodated.
Image of page 4
Expressiveness Aggregates Unions Data size
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
int * a; struct { int b, int c } * d; a = &d->c; Algorithm starts off with Input: a = s &d->c; The Initial type of each program variable is “blank” to indicate that there is no access pattern. τ a : blank ( s , {} ) τ d : blank ( s , {} )
Image of page 6
int * a; struct { int b, int c } * d; a = &d->c; We Match The Typing Rule x = s &y->n
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern