Transforming unstructured code to structured code

Kristian Bisgaard Lassen <krell@daimi.au.dk>
24 Aug 2005 18:25:16 -0400

          From comp.compilers

Related articles
Transforming unstructured code to structured code krell@daimi.au.dk (Kristian Bisgaard Lassen) (2005-08-24)
| List of all articles for this month |
From: Kristian Bisgaard Lassen <krell@daimi.au.dk>
Newsgroups: comp.compilers
Date: 24 Aug 2005 18:25:16 -0400
Organization: UNI-C
Keywords: tools, analysis
Posted-Date: 24 Aug 2005 18:25:16 EDT

Hi,


I have read some articles on how to transform an unstructured program
(i.e. a program with goto statements) to an equivalent structured
program (i.e. without the goto statements) if it is reduceable. The
approach describes rules for building basic blocks and combining these,
thereby removing all goto statements from the program. However, the
approach uses an algorithm for sorting these basic blocks before
proceeding to the combination phase. The approach I have tried to
understand and used has been described in many papers. Here are some
references:


Untangling Unstructured Cyclic Flows - A Solution Based on
Continuations, Jana Koehler


and


A Control-Flow Normalization Algorithm and Its Complexity


So to summaries: What is the exact algorithm that they use to order the
basic blocks? (They actually write the algorithms that they use by name,
but the problem is that I, apparently, do not know how these algorithms
work exactly)


Best regards,
      Kristian Bisgaard Lassen



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.