comp.lang.ada
 help / color / mirror / Atom feed
From: dewarr@my-dejanews.com
Subject: Re: Win CE target
Date: 1998/09/21
Date: 1998-09-21T00:00:00+00:00	[thread overview]
Message-ID: <6u6flv$qn7$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 6u65h0$f1b$1@nnrp1.dejanews.com

In article <6u65h0$f1b$1@nnrp1.dejanews.com>,
  dennison@telepath.com wrote:
> In article <EzLBxq.40n.0.-s@inmet.camb.inmet.com>,
>   stt@houdini.camb.inmet.com (Tucker Taft) wrote:
>
> > We have an Ada 95 compiler that generates efficient, human-readable
> > ANSI C as an intermediate language.  Given sufficient interest, this
> > could be integrated with any ANSI C development system for "Wince"
> > to produce an Ada 95 capability.
>
> Is this the legendary "Ada to C" converter that everyone is always asking
> about? :-)


Well of course the issue is the word "readable" in Tuck's
message (some people can read things more easily than others,
after all some people think the whole of the Ada RM is quite
readable :-)

Compiling Ada by translating into C is nothing new, at least
two vendors have followed this route before. Whether IM has
somehow managed to succeed where the others failed in
producing readable code remains to be seen.

Some of the trouble areas in compiling into C are

  1. Arithmetic overflow checks, especially in complex
     expressions, which have to be broken down into steps
     or written in prefix notation.

  2. Nested procedures, and particularly nested procedures
     with complex local declarations.

  3. Subunits (hard to do anything other than create a huge
     source in which the subunits are substituted).

  4. Exceptions

Note here I am talking about readability, rather than
efficiency, although all the above are also efficiency
issues.

Of course if you write simple minded Ada that uses only
features that translate into C, then the two vendors
compilers that I have talked about in the past have
worked fine.

Note that the list above is a small one, there are many
other problems.

It is interesting in the case of GNAT and GCC, that of course
it was possible for us to translate GNAT into a form that can
be processed by the backend, but we preferred not to because
the transformations were awkward and would have intefered
with optimizations in some cases. So we enhanced the backend
for example by adding self describing types to map Ada's
variant records directly. And remember we were working not
with C, but with GNU C, which solves some of these problems

Actually if I was trying to write a translator like this, I
would certainly consider Ada to GNU C, which would be much
easier. However, that would not meet all needs (e.g. the
requirement as for the SHARC of interfacing to the vendors
proprietary C compiler).

I will say for the record, that, according to MY definition
of readability, it is not possible to translate Ada 95 into
readable C in all cases.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




  reply	other threads:[~1998-09-21  0:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-20  0:00 Win CE target William A Whitaker
1998-09-20  0:00 ` dewarr
1998-09-20  0:00 ` dewarr
1998-09-20  0:00 ` Tucker Taft
1998-09-21  0:00   ` dennison
1998-09-21  0:00     ` dewarr [this message]
1998-09-28  0:00       ` Ada --> C Translation, was: " Stefan Helfert
1998-09-29  0:00         ` Robert A Duff
1998-10-10  0:00           ` Dr Amirez
1998-10-11  0:00             ` Dale Stanbrough
1998-10-10  0:00               ` Dr Amirez
1998-10-11  0:00                 ` Dale Stanbrough
1998-10-11  0:00                   ` Dr Amirez
1998-10-12  0:00                     ` Larry Kilgallen
1998-10-13  0:00                       ` dennison
1998-10-12  0:00                     ` Niklas Holsti
1998-10-12  0:00                 ` PC
1998-10-12  0:00                   ` Operating System in Ada (was Ada --> C Translation) Larry Kilgallen
1998-10-12  0:00                     ` Chris Morgan
1998-10-13  0:00                       ` Larry Kilgallen
1998-10-13  0:00                       ` Dale Stanbrough
1998-10-14  0:00                       ` dewarr
1998-10-12  0:00                     ` Tom Moran
1998-10-12  0:00                       ` Brian Rogoff
1998-10-13  0:00                         ` dennison
1998-10-13  0:00                           ` Brian Rogoff
1998-10-13  0:00                       ` Tucker Taft
1998-10-12  0:00                     ` dennison
1998-10-21  0:00                     ` Van Snyder
1998-10-22  0:00                       ` Tom Moran
1998-10-12  0:00                 ` Ada --> C Translation, was: Win CE target dennison
1998-10-12  0:00                   ` Larry Kilgallen
1998-10-14  0:00                   ` dewarr
1998-10-14  0:00                     ` Andi Kleen
1998-10-13  0:00             ` Robert I. Eachus
1998-10-14  0:00               ` Samuel Mize
1998-10-16  0:00                 ` Tasking/blocking system calls (was: Ada --> C Translation) Mats Weber
1998-09-29  0:00         ` Ada --> C Translation, was: Win CE target Tucker Taft
1998-09-30  0:00           ` dewarr
1998-09-23  0:00 ` falis
replies disabled

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