Application To Cobol
In the 1980s IBM researcher Harlan Mills oversaw the development of the COBOL Structuring Facility, which applied a structuring algorithm to COBOL code. Mills's transformation involved the following steps for each procedure.
- Identify the basic blocks in the procedure.
- Assign a unique label to each block's entry path, and label each block's exit paths with the labels of the entry paths they connect to. Use 0 for return from the procedure and 1 for the procedure's entry path.
- Break the procedure into its basic blocks.
- For each block that is the destination of only one exit path, reconnect that block to that exit path.
- Declare a new variable in the procedure (called L for reference).
- On each remaining unconnected exit path, add a statement that sets L to the label value on that path.
- Combine the resulting programs into a selection statement that executes the program with the entry path label indicated by L
- Construct a loop that executes this selection statement as long as L is not 0.
- Construct a sequence that initializes L to 1 and executes the loop.
Note that this construction can be improved by converting some cases of the selection statement into subprocedures.
Read more about this topic: Structured Program Theorem
Famous quotes containing the words application to and/or application:
“Five oclock tea is a phrase our rude forefathers, even of the last generation, would scarcely have understood, so completely is it a thing of to-day; and yet, so rapid is the March of the Mind, it has already risen into a national institution, and rivals, in its universal application to all ranks and ages, and as a specific for all the ills that flesh is heir to, the glorious Magna Charta.”
—Lewis Carroll [Charles Lutwidge Dodgson] (18321898)
“If you would be a favourite of your king, address yourself to his weaknesses. An application to his reason will seldom prove very successful.”
—Philip Dormer Stanhope, 4th Earl Chesterfield (16941773)