comp.lang.ada
 help / color / mirror / Atom feed
* Fortran To ADA
@ 1994-10-31  4:43 Paul Emerson
  1994-11-01 11:24 ` N. MELLOR
  1994-11-01 12:50 ` Gregory Aharonian
  0 siblings, 2 replies; 12+ messages in thread
From: Paul Emerson @ 1994-10-31  4:43 UTC (permalink / raw)


I don't normally read this group but I have an ADA question.  Someone in my
organization has inquired about a tool to convert Fortran to ADA.  Does such
a tool(s) exist?  Any pointers would be most helpful.

Paul
--
Paul Emerson
Global Technology Associates, Inc.
paul@gta.com
Tel. 407-380-0220
Fax. 407-380-6080

-- 
Paul Emerson
Global Technology Associates, Inc.
paul@gta.com



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Fortran To ADA
  1994-10-31  4:43 Fortran To ADA Paul Emerson
@ 1994-11-01 11:24 ` N. MELLOR
  1994-11-01 12:50 ` Gregory Aharonian
  1 sibling, 0 replies; 12+ messages in thread
From: N. MELLOR @ 1994-11-01 11:24 UTC (permalink / raw)


In article <paul-3110940042320001@gta.orfl.gate.net> paul@gta.com (Paul Emerson) writes:
>Subject: Fortran To ADA
>From: paul@gta.com (Paul Emerson)
>Date: 31 Oct 1994 04:43:24 GMT

>I don't normally read this group but I have an ADA question.  Someone in my
>organization has inquired about a tool to convert Fortran to ADA.  Does such
>a tool(s) exist?  Any pointers would be most helpful.


Paul, I'm nothing like knowledgeable on this, but have you/your colleague 
tried the AJPO FTP site on AJPO.SEI.CMU.EDU? I believe I remember someone 
mentioning that there were such utilities (or pointers to them) available 
there. You could also take a look at the Walnut Ada CD-ROM that was much 
discussed on this list a couple of months ago.

Nick

>Paul
>--
>Paul Emerson
>Global Technology Associates, Inc.
>paul@gta.com
>Tel. 407-380-0220
>Fax. 407-380-6080

>-- 
>Paul Emerson
>Global Technology Associates, Inc.
>paul@gta.com




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Fortran To ADA
  1994-10-31  4:43 Fortran To ADA Paul Emerson
  1994-11-01 11:24 ` N. MELLOR
@ 1994-11-01 12:50 ` Gregory Aharonian
  1994-11-01 13:56   ` David Weller
  1994-11-02 16:09   ` Charles Stump
  1 sibling, 2 replies; 12+ messages in thread
From: Gregory Aharonian @ 1994-11-01 12:50 UTC (permalink / raw)



>I don't normally read this group but I have an ADA question.  Someone in my
>organization has inquired about a tool to convert Fortran to ADA.  Does such
>a tool(s) exist?  Any pointers would be most helpful.

Such tools offer little cost benefit over translating the code by hand (along
with a good EMACS-like editor) because of the idiosyncracies of Fortran (like
tricks played with COMMON blocks, lack of builtin Complex math system, and
Fortran's freedom to pass any part of an array to a subroutine).

The Fortran-to-Ada tool found in the repositories and CDROMs, that tool that
came out of the WWMCCS Ada tool effort, was released to the public because it
was worthless.

Greg Aharonian



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Fortran To ADA
  1994-11-01 12:50 ` Gregory Aharonian
@ 1994-11-01 13:56   ` David Weller
  1994-11-02 16:09   ` Charles Stump
  1 sibling, 0 replies; 12+ messages in thread
From: David Weller @ 1994-11-01 13:56 UTC (permalink / raw)


In article <SRCTRAN.94Nov1075025@world.std.com>,
Gregory Aharonian <srctran@world.std.com> wrote:
>
>>I don't normally read this group but I have an ADA question.  Someone in my
>>organization has inquired about a tool to convert Fortran to ADA.  Does such
>>a tool(s) exist?  Any pointers would be most helpful.
>
>Such tools offer little cost benefit over translating the code by hand (along
>with a good EMACS-like editor) because of the idiosyncracies of Fortran (like
>tricks played with COMMON blocks, lack of builtin Complex math system, and
>Fortran's freedom to pass any part of an array to a subroutine).
>
True, but translating the "imperative" code isn't as bad as it may
seem.  THe bottom line is that you CAN get SOME translation by using
automatic tools, but you must first carefully evaluate how many
"dangerous" occurrences of FORTRAN you have and adjust expectation of
benefits accordingly.  Like any other engineering effort, all forms
of redesign should be considered before taking action.

>The Fortran-to-Ada tool found in the repositories and CDROMs, that tool that
>came out of the WWMCCS Ada tool effort, was released to the public because it
>was worthless.
>
I agree with Greg here.  It really is useless.  The FORTRAN
translator we have at CAE-Link works pretty well, but we can't give
it away, and the chimps we have in business suits (we call them The
Marketing Department) don't believe there's a market for a halfway
decent Fortran-Ada translator.  There probably isn't, but this is
just another example of a fairly decent tool that's buried in another
company, never to escape.


-- 
Proud (and vocal) member of Team Ada! (and Team OS/2)        ||This is not your
   	      Ada -- Very Cool.  Doesn't Suck.               ||  father's Ada 
For all sorts of interesting Ada tidbits, run the command:   ||________________
"finger dweller@starbase.neosoft.com | more" (or e-mail with "finger" as subj.)
   ObNitPick: Spelling Ada as ADA is like spelling C++ as CPLUSPLUS. :-) 



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Fortran To ADA
  1994-11-01 12:50 ` Gregory Aharonian
  1994-11-01 13:56   ` David Weller
@ 1994-11-02 16:09   ` Charles Stump
  1 sibling, 0 replies; 12+ messages in thread
From: Charles Stump @ 1994-11-02 16:09 UTC (permalink / raw)


In article 94Nov1075025@world.std.com, srctran@world.std.com (Gregory Aharonian) writes:
>
>>I don't normally read this group but I have an ADA question.  Someone in my
>>organization has inquired about a tool to convert Fortran to ADA.  Does such
>>a tool(s) exist?  Any pointers would be most helpful.
>
>Such tools offer little cost benefit over translating the code by hand (along
>with a good EMACS-like editor) because of the idiosyncracies of Fortran (like
>tricks played with COMMON blocks, lack of builtin Complex math system, and
>Fortran's freedom to pass any part of an array to a subroutine).
>
>The Fortran-to-Ada tool found in the repositories and CDROMs, that tool that
>came out of the WWMCCS Ada tool effort, was released to the public because it
>was worthless.
>
>Greg Aharonian

Translation from FORTRAN to Ada is not an impossible task. However, I
do not think that there are any commercial or even shareware tools which
do it well. If there are, I assume someone will tell me.

In GENERAL, language translation between procedural languages can be automated
to a large extent. In those areas where total automation can not be accomplished,
tools can greatly assist in the translation. The "trick" is NOT to perform 
line-by-line translation, but to apply heuristics to the problem in order
to perform intelligent translation. For example, determining what kind of
carazy things are going on in COMMONs or parallel arrays and logically converting
them to their correct Ada (or other language) constructs. 

There may not (probably is not) a one-to-one mapping of constructs and concepts 
between source and target languages. That is one of the reasons why there are 
different programming languages in the first place. One approach (the one I like)
is to abstract the program/code to a language independent design view and use
that as the basis for translation instead of doing all the work at the code level.


---
======================================================================
= Charles W. Stump II,   Sr. Software Engineer,   cstump@levtech.com =
======================================================================
= Leverage Technologists, Inc.	=	Reverse Engineering,         =
= P.O. Box 4638			=	Reengineering,               =
= Rockville, MD			=	Maintenance, and             =
= 20849-4638			=	Quality Assurance            =
= (301)309-8783			=	tools and services.          =
= http://stout.levtech.com/	=	                             =
======================================================================




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Fortran to Ada
@ 1994-11-03 20:48 Bob Crispen
  1994-11-04 14:24 ` Allan Plumb
  1994-11-07 11:09 ` Robert I. Eachus
  0 siblings, 2 replies; 12+ messages in thread
From: Bob Crispen @ 1994-11-03 20:48 UTC (permalink / raw)


>From: paul@gta.com (Paul Emerson) asks:

>I don't normally read this group but I have an ADA question.  Someone in my
>organization has inquired about a tool to convert Fortran to ADA.  Does such
>a tool(s) exist?  Any pointers would be most helpful.

We concluded in the Ada Simulation Validation Program in 1987 that when
you have Fortran code, it's nearly always worthwhile to redevelop it
rather than recoding it.  Alternately, you can put an Ada wrapper
around a LARGE chunk of Fortran.  Forget interfacing a bunch of small
chunks of Fortran -- it's not worth the aggravation.

Whenever we've ignored our own lessons learned (jeez, none of YOU guys
have ever done THAT ;-) and tried to re-code (that is, convert from line
to line, Fortran to Ada) we've created a nest of bugs that take forever
to find and fix.  When we redevelop, we find that previously annoying
but non-fatal bugs which have existed in the Fortran code since
time immemorial have now mysteriously disappeared.

Your mileage may vary, but I doubt it.
+-------------------------------+--------------------------------------+
| Bob Crispen                   |   Who will babysit the babysitters?  |
| crispen@foxy.hv.boeing.com    +--------------------------------------+
| (205) 461-3296                |Opinions expressed here are mine alone|
+-------------------------------+--------------------------------------+



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Fortran to Ada
  1994-11-03 20:48 Fortran to Ada Bob Crispen
@ 1994-11-04 14:24 ` Allan Plumb
  1994-11-07 11:09 ` Robert I. Eachus
  1 sibling, 0 replies; 12+ messages in thread
From: Allan Plumb @ 1994-11-04 14:24 UTC (permalink / raw)


Bob Crispen <crispen@EIGHT-BALL.HV.BOEING.COM> writes:
|> Whenever we've ignored our own lessons learned (jeez, none of YOU guys
|> have ever done THAT ;-) and tried to re-code (that is, convert from line
|> to line, Fortran to Ada) we've created a nest of bugs that take forever
|> to find and fix.  When we redevelop, we find that previously annoying
|> but non-fatal bugs which have existed in the Fortran code since
|> time immemorial have now mysteriously disappeared.
|> 
|> Your mileage may vary, but I doubt it.

  Oh?  Whenever I've seen people redevelop in another language (or the
  same language) without paying sufficient attention to the existing
  system, I've seen: 

    - many capabilities of the existing system are lost
      (but of course everybody else has up-to-date requirements, right?)

    - validation of the new system is iffy, since they don't have 
      anything to compare it to at lower levels

  I've seen several cases at JSC of "Here's the new improved version of
  system X; it does everything the old one did!  ...   Function ZZZ? 
  I didn't know anybody still used that. ... Function QQQ?  Nobody ever
  told me the system was supposed to do that. ... Why is the new system
  giving shuttle cross-ranges off by 10 miles from the old system? 
  Let me spend a couple of months to figure that out."

  And "re-code (that is, convert from line to line, Fortran to Ada)"
  is or should be a straw-man argument.  _Of course_ line by line 
  conversion won't work.  So why would you do that?  I.e., translators
  _by themselves_ aren't up to the task, but reengineering FORTRAN to 
  Ada is a bit more than putting semi-colons on the ends of the lines...

  My own experience was reengineering a FORTRAN orbital maneuver program
  to Ada.  About 40 KSLOC, FWIW.  The resultant Ada program gaves answers
  identical to 15 decimal places to the FORTRAN, and I _know_ that no
  capabilities were left out, because I have a trail from every FORTRAN
  algorithm to the Ada replacement, or documentation of why it was not
  needed.  And BTW, we found several "annoying bugs in the FORTRAN" and
  fixed them as we went.

  And I've seen quite a few redevelopment projects that hit the other
  problems I mentioned, and my coworkers have told me of more.


  Is reengineering difficult and time-consuming?  Yes.  Does it have 
  advantages over redevelopment?  Also yes.  Are the advantages worth
  the time?  Now _here_, your mileage may indeed vary.

  Carry on.

 -- Allan Plumb (adp@gothamcity.jsc.nasa.gov)



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Fortran to Ada
  1994-11-03 20:48 Fortran to Ada Bob Crispen
  1994-11-04 14:24 ` Allan Plumb
@ 1994-11-07 11:09 ` Robert I. Eachus
  1 sibling, 0 replies; 12+ messages in thread
From: Robert I. Eachus @ 1994-11-07 11:09 UTC (permalink / raw)



    A (possibly partly apocryphal--I wasn't at the final presentation)
incident from the early days of Ada:

    We were asked to recode some existing FORTRAN code in Ada and
report on the relative performace.  A quick line-for-line translation
resulted in an immediate CONSTRAINT_ERROR.  The fix was fairly obvious
and off to find the next one.

    Two weeks (and seventeen bug fixes) later we had an Ada version
that survived the regression suite developed for the FORTRAN version,
but it gave different answers.  (The seventeen bug number is amazing
since this was about 850 original SLOC, the fixed version was larger.)
So we made "the same" corrections in the FORTRAN source, and we had
two different language versions which produced identical output.  Now
finally we could do the benchmarking...

    The Ada version was significantly slower (about 25%) than the
original FORTRAN version and very slightly (about 2%) faster than the
fixed FORTRAN version.  But this code was in the OS scheduling
software.  When we put the fixed version in there, everything ran
faster.

    Then this was presented to senior management. At about slide two,
the presentation was halted to find out how such badly broken code
could get through quality control and out the door.  After standing
there for almost an hour, the presenter got to his next slide, and was
asked why he bothered presenting results with the "broken" FORTRAN. He
then explained that the fixes had yet to be accepted by QC, since the
new software didn't pass the regression tests...

    That meeting made the Ada group some enemies that lasted until
well after I left the company.

    I've since had many similar experiences, and my expectation has
become that ALL FORTRAN numerics code is full of bugs, even my own.

--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Fortran to Ada
@ 1994-11-10 17:25 Bob Crispen
  0 siblings, 0 replies; 12+ messages in thread
From: Bob Crispen @ 1994-11-10 17:25 UTC (permalink / raw)


Allan Plumb <adp@CETIJSC.NASA.GOV> sez:

>  Oh?  Whenever I've seen people redevelop in another language (or the
>  same language) without paying sufficient attention to the existing
>  system, I've seen:
>
>    - many capabilities of the existing system are lost
>      (but of course everybody else has up-to-date requirements, right?)
>
>    - validation of the new system is iffy, since they don't have
>      anything to compare it to at lower levels

I have a feeling we're talking about the same thing, but using different
words for it.  By "redevelop" I mean start to with the requirements and
the design, but mostly ignore the code, except to see whether some
design got into the code without making it into the design documentation.

I didn't use the word "reengineer" but if I had, I would have meant to
start with the requirements and ignore both the design and the code.
Evidently you're calling "reengineering" what I call "redeveloping"
since you say:

>  I _know_ that no
>  capabilities were left out, because I have a trail from every FORTRAN
>  algorithm to the Ada replacement, or documentation of why it was not
>  needed.

which implies that you're using the existing design.  I'm afraid the
fault is probably mine in the misuse of words, so I apologize for any
confusion I might have caused.

No.  Wait a minute.  If somebody is collecting Government money
(= my money) by saying that they're "redeveloping" something when all
they're doing is recoding it (albeit from slightly larger chunks
than line-by-line translation), then I think they're circumventing
the purpose of the ASVP Final Report (and many, many others) which said
"thou shalt redevelop; thou shalt not recode".

Never mind what "reengineering" means; we knew damn well on ASVP what
"redevelopment" meant, and it didn't mean recoding.  I suspect that some
quick-and-dirty contractors convinced somebody that recoding was
the same thing as redeveloping, and therefore OK.  I think that's a
damn shame.

I don't agree that:

>  "re-code (that is, convert from line to line, Fortran to Ada)"
>  is or should be a straw-man argument.

since the original poster asked:

>Someone in my
>organization has inquired about a tool to convert Fortran to ADA.  Does such
>a tool(s) exist?

I don't think we should underestimate the ability of intelligent
and decent but ignorant folks to make all sorts of mistakes.  I'm
tickled to death that it's obvious to you (and to me) that line-for-line
recoding or translating is a dumb idea; I don't think it's safe to
assume that everybody knows what we know.

Like I said, I think we're basically in agreement, and that if anything
is a straw man it's:

>  Whenever I've seen people redevelop in another language (or the
>  same language) without paying sufficient attention to the existing
>  system

Whenever I've seen people drive without paying sufficient attention to
the road....
+-------------------------------+--------------------------------------+
| Bob Crispen                   |   Who will babysit the babysitters?  |
| crispen@foxy.hv.boeing.com    +--------------------------------------+
| (205) 461-3296                |Opinions expressed here are mine alone|
+-------------------------------+--------------------------------------+



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Fortran to Ada
@ 2003-12-03 13:20 Anders Sneckenborg
  2003-12-03 20:08 ` Randy Brukardt
  2003-12-03 20:53 ` Gautier Write-only
  0 siblings, 2 replies; 12+ messages in thread
From: Anders Sneckenborg @ 2003-12-03 13:20 UTC (permalink / raw)


I have been looking for a (preferably free) Fortran (77, 90) to Ada
translation tool.

Any ideas where I can find such a tool?


Regards
Anders Sneckenborg
SIMBAL syd AB



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Fortran to Ada
  2003-12-03 13:20 Anders Sneckenborg
@ 2003-12-03 20:08 ` Randy Brukardt
  2003-12-03 20:53 ` Gautier Write-only
  1 sibling, 0 replies; 12+ messages in thread
From: Randy Brukardt @ 2003-12-03 20:08 UTC (permalink / raw)



"Anders Sneckenborg" <anders@simbalsyd.se> wrote in message
news:c4d7d749.0312030520.473fd5de@posting.google.com...
> I have been looking for a (preferably free) Fortran (77, 90) to Ada
> translation tool.
>
> Any ideas where I can find such a tool?

Ada Solutions has such a tool, but it isn't free.
http://www.ada-solutions.com/

                  Randy.






^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Fortran to Ada
  2003-12-03 13:20 Anders Sneckenborg
  2003-12-03 20:08 ` Randy Brukardt
@ 2003-12-03 20:53 ` Gautier Write-only
  1 sibling, 0 replies; 12+ messages in thread
From: Gautier Write-only @ 2003-12-03 20:53 UTC (permalink / raw)


Anders Sneckenborg:

> I have been looking for a (preferably free) Fortran (77, 90) to Ada
> translation tool.
> 
> Any ideas where I can find such a tool?

f2a is quite good.
Translated a many numerics sources with it.
You need pre- and after- translation work of course.
And you discover often a good load of bugs never detected
in the Fortran code...

URL: ftp://ftp.usafa.af.mil/pub/dfcs/carlisle/usafa/for2ada95/

Is there a newer version than 2.2000 (someone ?) ? 

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-12-03 20:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-11-03 20:48 Fortran to Ada Bob Crispen
1994-11-04 14:24 ` Allan Plumb
1994-11-07 11:09 ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
2003-12-03 13:20 Anders Sneckenborg
2003-12-03 20:08 ` Randy Brukardt
2003-12-03 20:53 ` Gautier Write-only
1994-11-10 17:25 Bob Crispen
1994-10-31  4:43 Fortran To ADA Paul Emerson
1994-11-01 11:24 ` N. MELLOR
1994-11-01 12:50 ` Gregory Aharonian
1994-11-01 13:56   ` David Weller
1994-11-02 16:09   ` Charles Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox