CSE 501 Principles and Applications of Program Analysis
CSE 501 ! Principles and Applications! of Program Analysis! " Alvin Cheung" Spring 15" Welcome to CSE 501!" The Cast" App–4 A. Cheung et al. Q, D, σ, h , e Q0, D0, σ, h0 ,(σ0, e ) h i i !h i i Q0, D0, σ, h0 , e Q00, D00, σ, h00 ,(σ00, e ) h i a !h i a force(Q00, D00,(σ0, e )) Q000, D000, v J K i ! i force(Q000, D000,(σ00, ea)) Q0000, D0000, va J K ! [Array deference] Q, D, σ, h , e [e ] Q0000, D0000, σ, h00 , h00[v , v ] h i a i !h i a i J K Q, D, σ, h , e Q0, D0, σ, h0 ,(σ0, e) Q000 = Q00[id (v, )] h i !h i ! ; force(Q0, D0,(σ0, e)) Q00, D00, v id is a fresh identifier ! [Read query] J Q, DK, σ, h , R(e) Q000, D00, σ, h0 , ([ ], id) h i !h i Semantics ofJ statements: K [Skip] Q, D, σ, h , skip Q, D, σ, h h i !h i J K Q, D, σ, h , e Q0, D0, σ, h0 ,(σ0, e) h i !h i Q0, D0, σ, h0 , el Q00, D00, σ, h00 , vl h i !h i [Assignment] Q, D, σ,Jh , e := e KQ00, D00, σ[v (σ0, e)], h00 h i l !h l ! i J K J K Q, D, σ, h , e Q0, D0, σ, h0 ,(σ0, e) h i !h i force(Q0, D0,(σ0, e)) Q00, D00, True ! J Q00, D00, σ, h0 K, s1 Q000, D00, σ0, h00 h i !h i [Conditional–true] Q, D, σ, h , if(e) then s else s Q000, D000, σ0, h00 h i 1 2 !h i J K J K Q, D, σ, h , e Q0, D0, σ, h0 ,(σ0, e) h i !h i force(Q0, D0,(σ0, e)) Q00, D00, False ! Q00, D00, σ, h0 , s2 Q000, D00, σ0, h00 Jh iK !h i [Conditional–false] Q, D, σ, h , if(e) then s1 else s2 Q000, D000, σ0, h00 h J i K !h i J K Q, D, σ, h , s Q0, D0, σ0, h0 h i !h i [Loop] Q, D, σ, h , while(True) do s Q0, D0, σ0, h0 h i !h i Instructor" J K J K Q, D, σ, h , e Q0, D0, σ, h0 ,(σ0, e) h i !h i force(Q0, D0,(σ0, e)) Q00, D00, v ! update(D00, v) D000 J K ! D000[Q00[id].s] if Q00[id].rs = Alvin Cheung" id Q00 .
[Show full text]