static6 - Shape Analysis Static Analysis 2009 Michael I...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Shape Analysis Shape Analysis Static Analysis 2009 Static Analysis 2009 Michael I. Schwartzbach Computer Science, University of Aarhus
Background image of page 1

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

View Full Document Right Arrow Icon
2 2 Static Analysis Looking Into The Heap Looking Into The Heap ± A non-trivial heap structure: ± Deciding disjointness of data structures: •x and y are not disjoint •y and z are disjoint x y z
Background image of page 2
3 3 Static Analysis Shape Graphs Shape Graphs ± Graphs that describe possible heaps: • nodes are pointer targets • edges are possible pointer references ± The lattice of shape graphs is: 2 Targets × Targets ordered under subset inclusion ± For every CFG node, v, we introduce a constraint variable [[v]] describing the heap after v
Background image of page 3

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

View Full Document Right Arrow Icon
4 4 Static Analysis Shape Constraints Shape Constraints ± For pointer operations: id = malloc : [[v]] = JOIN (v) id { ( & id , malloc- i ) } id 1 =& id 2 : [[v]] = JOIN (v) id 1 { ( & id 1 , & id 2 ) } id 1 = id 2 : [[v]] = assign ( JOIN (v), id 1 , id 2 ) id 1 =* id 2 : [[v]] = right ( JOIN (v), id 1 , id 2 ) •* id 1 = id 2 : [[v]] = left ( JOIN (v), id 1 , id 2 ) id =null : [[v]] = JOIN (v) id ± For all other CFG nodes: • [[v]] = JOIN (v)
Background image of page 4
5 5 Static Analysis Auxiliary Functions Auxiliary Functions ± JOIN (v) = [[w]] ±
Background image of page 5

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

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

{[ snackBarMessage ]}

Page1 / 15

static6 - Shape Analysis Static Analysis 2009 Michael I...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online