Structural Analysis in Control Flow: Objectives and Techniques, Slides of Computer Science

An overview of structural analysis, a more refined form of interval analysis used in control flow for software verification. Topics covered include t1-t2 analysis, structural analysis, reaching definitions, and constant folding.

Typology: Slides

2012/2013

Uploaded on 03/28/2013

ekanath
ekanath 🇮🇳

3.8

(4)

76 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Objectives_template
file:///D|/...ary,%20Dr.%20Sanjeev%20K%20Aggrwal%20&%20Dr.%20Rajat%20Moona/Multi-core_Architecture/lecture%2028/28_1.htm[6/14/2012 12:09:24 PM]
Module 14: Approaches to Control Flow Analysis
Lecture 28: Structural Analysis
The Lecture Contains:
T1- T2 Analysis
Structural Analysis
Dataflow Analysis
Typical Equation
Reaching Definitions
Analysis of Structured Programs
Reaching Definition Analysis
Constant Folding
Example
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Structural Analysis in Control Flow: Objectives and Techniques and more Slides Computer Science in PDF only on Docsity!

Module 14: Approaches to Control Flow Analysis

Lecture 28: Structural Analysis

The Lecture Contains:

T1- T2 Analysis

Structural Analysis

Dataflow Analysis

Typical Equation

Reaching Definitions

Analysis of Structured Programs

Reaching Definition Analysis

Constant Folding

Example

Module 14: Approaches to Control Flow Analysis

Lecture 28: Structural Analysis

T1- T2 Analysis

T1 transformation collapses one node self loop to a node T2 transformation collapses sequence of two nodes into one if the second node has only one predecessor

Module 14: Approaches to Control Flow Analysis

Lecture 28: Structural Analysis

An acyclic region that does not fit any of the simple categories and so is identified as a proper interval

Structural Analysis of a flow graph

Control tree of the flow graph analyzed in the previous slide

access X –pointer *q = y

Module 14: Approaches to Control Flow Analysis

Lecture 28: Structural Analysis

Analysis of Structured Programs

gen(S) = {d} kill(S) = Da - {d} out(S) = gen(S) S in(S) - kill(S)

gen(S) = gen(S2) S gen(S1) - kill(S2) kill(S) = kill(S2) S kill(S1) - gen(S2) in(S1) = in(S) in(S2) = out(S1) out(S) = out(S2)

gen(S) = gen(S1) S gen(S2) kill(S) = kill(S1) T kill(S2) out(S) = out(S1) S out(S2)

Module 14: Approaches to Control Flow Analysis

Lecture 28: Structural Analysis

Reaching Definition Analysis

A definition d reaches end of a block iff either

It is generated in the block It reaches block and not killed

Kill & gen known for each block. A program with N blocks has 2N equations with 2N unknowns and therefore, solution is possible.

Use iterative forward bit vector approach

for each block B do in(B) = ; out(B) = gen(B) endfor; change = true; while change do change = false; for each block B do newin = S out(P) if newin 6= in(B) then { change = true; in(B) = newin; out(B) = in(B) - kill(B) S gen(B); } endfor endwhile