| Related articles |
|---|
| Algorithm for Structurizing jlapp@nova.umd.edu (1994-12-04) |
| Re: Algorithm for Structurizing donawa@bnr.ca (chris (c.d.) donawa) (1994-12-09) |
| Re: Algorithm for Structurizing kik@zia.cray.com (1994-12-05) |
| Re: Algorithm for Structurizing danhicks@aol.com (1994-12-06) |
| Re: Algorithm for Structurizing tleylan@aloha.com (1994-12-07) |
| Re: Algorithm for Structurizing tleylan@aloha.com (1994-12-11) |
| Re: Algorithm for Structurizing tleylan@aloha.com (1994-12-13) |
| Re: Algorithm for Structurizing tleylan@aloha.com (1994-12-14) |
| Newsgroups: | comp.compilers |
| From: | danhicks@aol.com (DanHicks) |
| Keywords: | analysis |
| Organization: | America Online, Inc. (1-800-827-6364) |
| References: | 94-12-036 |
| Date: | Tue, 6 Dec 1994 03:45:21 GMT |
jlapp@nova.umd.edu (Joe Lapp) writes:
>>>
Hey, does anybody know of an algorithm for turning unstructured code
into structured code? I'm as interested in an algorithm as I am in
any tools that might do the job for me.
<<<
Well, there are some algorithms used inside compilers to "rediscover"
loops, etc. The most basic tool is the depth-first control flow walk,
which will (with appropriate notation and a few scans of the annotated
graph) identify loops and some non-structured constructs (such as a branch
into the middle of a loop).
Any good book on compiler optimization will cover the basic concepts
(though you'll likely have to wade through a lot of other stuff to extract
those concepts).
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.