At 05:34 AM 2/9/2004, Herbert Fruechtl wrote:
>I did a fairly large program (10**5 lines) with FORESYS (from Simulog) a few
>years ago. It does more than just formatting. If requested, it will attempt
>to restructure loops, convert common blocks to modules (as long as the
>members have the same name in each unit), create interfaces, analyse INTENT,
>etc. Lots of formatting options as well. Fairly powerful, but also
>expensive, as far as I remember.
>
>If you start from spaghetti code full of GOTO and EQUIVALENCE statements, of
>course, no tool will help you..
>
> Herbert
> >
> > One tool, which I don't think has been mentioned in
> > this thread, is the Spag that comes with the (paid for) plusFORT
> > from Polyhedron. This does some f77 to f90 conversion including
> > fixed to free format, f90 declarations, intent for arguments,
> > do while, exit and cycle, etc.
> > See: http://www.polyhedron.com/pf/plusfort.html
> >
>
In my mind, GOTO removal falls in the area of f66 to (extended) f77
conversion. With any code of sufficient value to justify the effort, these
tools, including the free scripts based on struct and ratfor, can improve
them greatly. I generally run them before an f90 conversion such as Alan
Miller's. g77 cycle, exit, do-enddo, dowhile(), all conform to f90, and I
would go to some lengths to avoid a compiler which doesn't support them.
This does involve some hand work, such as fixing up potential compound
IF's, and testing to avoid breaking the code.
Tim Prince
|