Removing backward go-to statements from Ada programs: possibilities and problems

  • Authors:
  • Ward D. Maurer

  • Affiliations:
  • The George Washington University, Washington, DC, USA

  • Venue:
  • Proceedings of the 2008 ACM annual international conference on SIGAda annual international conference
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

We here apply a recent mathematical result to the design of a process for removing backward go-to statements from Ada programs. Such statements are often used by programmers whose only reasons to use Ada are contractual. The mathematical result involves directed graphs, such as the flow graphs of programs, and the first step in our algorithm involves constructing the flow graph of an Ada program. In the second step, this flow graph is rearranged according to our mathematical result, which specifies a linear order for every flow graph, together with a structure for it, of loops within loops, in which no loops overlap. In the third step, a new Ada program is produced from the rearranged flow graph. A problem arises here, within the syntax of Ada, which does not allow branching into a sequence of statements. We show how this problem must be addressed, even though addressing it can involve removing existing structure from the Ada program which we are processing.