Presentation is loading. Please wait.

Presentation is loading. Please wait.

Claus Brabrand, ITU, Denmark STATIC ANALYSIS (DATA-FLOW ANALYSIS)Apr 09, 2008 Static Analysis: Data-Flow Analysis IV Claus Brabrand ITU - IT University.

Similar presentations


Presentation on theme: "Claus Brabrand, ITU, Denmark STATIC ANALYSIS (DATA-FLOW ANALYSIS)Apr 09, 2008 Static Analysis: Data-Flow Analysis IV Claus Brabrand ITU - IT University."— Presentation transcript:

1 Claus Brabrand, ITU, Denmark STATIC ANALYSIS (DATA-FLOW ANALYSIS)Apr 09, 2008 Static Analysis: Data-Flow Analysis IV Claus Brabrand ITU - IT University of Copenhagen ( brabrand@itu.dk ) ( AMP’08: Advanced Models & Programs, 2008 ) ( WORKSHOP )

2 [ 2 ] Claus Brabrand, ITU, Denmark STATIC ANALYSIS (DATA-FLOW ANALYSIS)Apr 09, 2008 Data-Flow Analyses :-) ’  ’ ’  ’ ’  ’  ’  ’  ’  ’  = ”Reaching Definitions” ”Very Busy Expressions” ”AvailableExpressions””Live Variables” Variables” ( ,  ) ( ,  ) ( ,  ) ( ,  ) backwards must may forwards ”You have seen…” ”You haven’t seen…”

3 [ 3 ] Claus Brabrand, ITU, Denmark STATIC ANALYSIS (DATA-FLOW ANALYSIS)Apr 09, 2008 WORKSHOP 1) ”Reaching Definitions”:  (forwards),  (may / smallest set) 2) ”Live Variables”:  (backwards),  (may / smallest set) 3) ”Available Expressions”:  (forwards),  (must / largest set) 4) ”Very Busy Expressions”:  (backwards),  (must / largest set) Agenda: - Group formation (15’) - Workshop (2h45’) - Presentations (4  15’)

4 [ 4 ] Claus Brabrand, ITU, Denmark STATIC ANALYSIS (DATA-FLOW ANALYSIS)Apr 09, 2008 WORKSHOP 1) Define the problem 2) Show that the problem is undecidable 3) Define a Lattice Check that it is a lattice (and explain how) 4) Define monotone transfer functions Check that they are monotone (and explain how) 5) Pick a program the analysis ”can analyze” …and make ”an entire process”-diagram (cf. slide #3) 6) Repeat 5) for program analysis ”can’t do” 7) Explain possible uses of the analysis

5 [ 5 ] Claus Brabrand, ITU, Denmark STATIC ANALYSIS (DATA-FLOW ANALYSIS)Apr 09, 2008 The Language ’C--’ Syntactic Categories: Expressions ( E  EXP): Statements ( S  STM): For simplicity: Let’s assume we only have variables ‘ x ’, ‘ y ’, and ‘ z ’ ! E : n | v | E + E’ | – E | E * E’ | E == E’ | input S : skip ; | v := E ; | output E ; | { S 1 … S n } | if E then S else S’ | while E do S


Download ppt "Claus Brabrand, ITU, Denmark STATIC ANALYSIS (DATA-FLOW ANALYSIS)Apr 09, 2008 Static Analysis: Data-Flow Analysis IV Claus Brabrand ITU - IT University."

Similar presentations


Ads by Google