comp.lang.ada
 help / color / mirror / Atom feed
From: "SteveD" <nospam_steved94@attbi.com>
Subject: Re: Commercial C To Ada 95 compiler
Date: Sat, 08 Jun 2002 03:19:19 GMT
Date: 2002-06-08T03:19:19+00:00	[thread overview]
Message-ID: <XIeM8.136874$ux5.183535@rwcrnsc51.ops.asp.att.net> (raw)
In-Reply-To: 3D0116F3.7254E263@despammed.com

"Wes Groleau" <wesgroleau@despammed.com> wrote in message
news:3D0116F3.7254E263@despammed.com...
>
[snip]
> A direct translation to Ada will reveal
> some bugs at compile time.  And the developers
> are looking at a language they can read
> when they fix those bugs.

I disagree.  A direct translation to Ada should not reveal any bugs at
compile time.  In fact it should replicate memory leaks and errant pointers.
If it doesn't do so, it is not a direct translation.

If C coding errors are translated directly to Ada, the error should be
reproduced.  However looking at the code that is generated, the error in the
source may be obvious if reviewed by a human reader.

For example, the C code:

  for( i = 0 ; i < 10 ; i++ );
  {
    printf( "%d\n", i );
  }

Should be directly translated to:

  i : Integer;

  i := 0;
  while i < 10 loop
    i := i + 1;
  end loop;
  Ada.Integer.Text_Io.Put( i );
  Ada.Text_Io.New_Line;

bug and all.  To do anything else would not be a direct translation.

Once the code has been translated these sort of problems are easy to spot
with code walk-thrus.  A translator also may be set up do report potential
problem areas.

In my experince with Pascal to Ada translation, no bugs showed up as a
result of direct translation.  Bugs only showed up because of incomplete
translation and in cases where I refined the code by hand to permit the
compiler to make more checks.

SteveD

> Other bugs will appear as the developers
> improve things in the process of working
> on the code.
>
> --
> Wes Groleau
> http://freepages.rootsweb.com/~wgroleau





  reply	other threads:[~2002-06-08  3:19 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-03  9:26 Commercial C To Ada 95 compiler Henrik Quintel
2002-06-03 18:52 ` Ingo Marks
2002-06-04  6:40   ` Henrik Quintel
2002-06-04 14:11     ` Frank J. Lhota
2002-06-04 14:26       ` Preben Randhol
2002-06-04 16:38         ` Frank J. Lhota
2002-06-03 20:26 ` Florian Weimer
2002-06-04  6:43   ` Henrik Quintel
2002-06-04 14:18     ` Lutz Donnerhacke
2002-06-07  3:48 ` Richard Riehle
2002-06-07 12:46   ` SteveD
2002-06-07 13:20     ` Marin David Condic
2002-06-09 21:43       ` Stephen Leake
2002-06-10 13:17         ` Marin David Condic
2002-06-11 12:52           ` SteveD
2002-06-11 13:32             ` Marin David Condic
2002-06-12 14:07               ` Larry Kilgallen
2002-06-12 13:21                 ` Marin David Condic
2002-06-07 13:21   ` Larry Kilgallen
2002-06-07 19:48     ` Ted Dennison
2002-06-07 20:26       ` Wes Groleau
2002-06-08  3:19         ` SteveD [this message]
2002-06-08  3:59           ` Jim Rogers
2002-06-08  4:14             ` Darren New
2002-06-08  4:50               ` SteveD
2002-06-08 12:04                 ` Robert Dewar
2002-06-10 18:44               ` Wes Groleau
2002-06-10 19:23                 ` Darren New
2002-06-10 20:55                   ` Wes Groleau
2002-06-10 21:03                     ` Darren New
2002-06-08  4:46             ` SteveD
2002-06-08 12:11               ` Robert Dewar
2002-06-08 18:46                 ` SteveD
2002-06-10 13:34                   ` Marin David Condic
2002-06-11 16:38                     ` Wes Groleau
2002-06-11 17:27                       ` Marin David Condic
2002-06-12 13:18                         ` Pascal Obry
2002-06-10 18:47               ` Wes Groleau
2002-06-10 21:23                 ` Larry Kilgallen
2002-06-10 20:59                   ` Wes Groleau
2002-06-10 21:37                     ` Robert A Duff
2002-06-10 22:34                       ` Wes Groleau
2002-06-08 12:06             ` Robert Dewar
2002-06-08 15:53             ` Richard Riehle
2002-06-08 15:58               ` Preben Randhol
2002-06-10 13:37                 ` Marin David Condic
2002-06-10 23:32                   ` Darren New
2002-06-11 13:11                     ` Marin David Condic
2002-06-12 15:42                       ` Darren New
2002-06-21 17:23                         ` David Thompson
2002-06-08 17:45               ` tmoran
2002-06-08 18:32               ` Pascal Obry
2002-06-09 17:41                 ` Richard Riehle
2002-06-10  8:11                   ` Fraser Wilson
2002-06-08 20:06               ` Jim Rogers
2002-06-09 17:49                 ` Richard Riehle
replies disabled

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