Back to Search
Start Over
Generalized structured programs and loop trees
- Source :
-
Science of Computer Programming . Jul2007, Vol. 67 Issue 2/3, p223-246. 24p. - Publication Year :
- 2007
-
Abstract
- Abstract: Any directed graph, even a flow graph representing “spaghetti code”, is shown here to have at least one loop tree, which is a structure of loops within loops in which no loops overlap. The nodes of the graph may be rearranged in such a way that, with respect to their new order, every edge proceeds in the forward direction except for the loopbacks. Here a loopback goes from somewhere in a loop to the head of . We refer to such a rearrangement as a generalized structured program, in which forward goto statements remain unrestricted. Like a min-heap or a max-heap, a loop tree has an array representation, without pointers; it may be constructed in time no worse than for any program written in this fashion. A scalable version of this construction uses a label graph, whose only nodes are the labels of the given program. A graph has a unique loop tree if and only if it is reducible. [Copyright &y& Elsevier]
Details
- Language :
- English
- ISSN :
- 01676423
- Volume :
- 67
- Issue :
- 2/3
- Database :
- Academic Search Index
- Journal :
- Science of Computer Programming
- Publication Type :
- Academic Journal
- Accession number :
- 25567079
- Full Text :
- https://doi.org/10.1016/j.scico.2007.02.002