Re: test at top ==> test at bottom

marcoz@CS.CMU.EDU (Marco Zagha)
Fri, 30 Apr 1993 15:59:38 GMT

          From comp.compilers

Related articles
test at top ==> test at bottom max@nic.gac.edu (1993-04-28)
Re: test at top ==> test at bottom preston@dawn.cs.rice.edu (1993-04-29)
Re: test at top ==> test at bottom marcoz@CS.CMU.EDU (1993-04-30)
Re: test at top ==> test at bottom tim@apple.com (1993-05-14)
| List of all articles for this month |

Newsgroups: comp.compilers
From: marcoz@CS.CMU.EDU (Marco Zagha)
Keywords: optimize
Organization: School of Computer Science, Carnegie Mellon University
References: 93-04-105
Date: Fri, 30 Apr 1993 15:59:38 GMT

max@nic.gac.edu (Max Hailperin) writes:


      While working my way through the literature on certain forms of loop
      optimization, it occurred to me that I haven't seen much in the literature
      on transformations that will turn test-at-the-top loops into
      test-at-the-bottom loops. Yet unless you've done so, you can't safely
      assume the loop will be done at least once. [Are there citations?]


Sorry, I can't help you out with your question, but your query
reminded me of an abstract I came across. The author describes how he
conquered the inverse problem for his COBOL program:


    Author Hildebrand, K.;
                              Mannheim Univ., West Germany
    Title Implementation of Quicksort in COBOL
    Source Angewandte Informatik;
                              Angew. Inform. (West Germany); vol.31, no.1; Jan.
1989; pp. 14-18
    Abstract The classic recursive Quicksort algorithm by Hoare
     (1962) is the starting point of this study. The
transformation into an iterative algorithm effected by
N. Wirth (1983) in Pascal serves as a model for the
implementation into COBOL. Of particular importance is
the accurate transformation of the loops, since the
loop structure in COBOL (PERFORM . . UNTIL with
prechecking prior to looping) is not the same as in
Pascal (accepting REPEAT . . UNTIL). Additionally,
COBOL Standard 85 with in-line-PERFORM is taken into
consideration


== Marco Zagha (marcoz@cs.cmu.edu)
--


Post a followup to this message

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