16.07.2014 Views

PROGRAM STRUCTURE TREES - Software Systems Lab

PROGRAM STRUCTURE TREES - Software Systems Lab

PROGRAM STRUCTURE TREES - Software Systems Lab

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

a<br />

b<br />

t_1<br />

entry<br />

a<br />

entry<br />

b<br />

entry<br />

c<br />

T F<br />

T<br />

c<br />

F<br />

d<br />

e<br />

d<br />

e<br />

t_2<br />

exit<br />

exit<br />

exit<br />

g<br />

g<br />

(a) Refined region<br />

(b) After transformation<br />

Figure 3: Transform an extended region to a plain region<br />

Every region is also a refined region. The definitions for trivial and<br />

canonical regions also apply to refined regions.<br />

An analysis of the Polyhedron 1 benchmark showed that only about<br />

30% of all refined regions are simple regions. The complete analysis<br />

can be found in Table 2.<br />

2.4 Program structure tree<br />

In general there are multiple canonical regions in every CFG. Two<br />

canonical regions A and B may contain the same basic blocks. In this<br />

case either region A is completely contained in region B, such as all<br />

basic blocks in A are also in B, or B is completely contained in A.<br />

This relationship is represented as a program structure tree, where a<br />

region B is an ancestor of A, if B is completely contained in A.<br />

The example in 4 shows a CFG where the simple regions are marked<br />

with blue and the refined regions with orange borders.<br />

3 different algorithms<br />

There are different algorithms available, that can be used to analyze a<br />

CFG and build a region tree. They differ in the CFGs they can analyze,<br />

the kind of region they can detect, as well as the implementation afford<br />

necessary, the runtime complexity and/or the required prerequisites.<br />

1 http://www.polyhedron.com<br />

4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!