* Re: Ada to C++ translator?
@ 2001-02-21 15:44 gautier
0 siblings, 0 replies; 60+ messages in thread
From: gautier @ 2001-02-21 15:44 UTC (permalink / raw)
To: comp.lang.ada
>>The last time I checked, which was only a few weeks ago, the Mozilla
>>guide was so dated that it's pretty much useless.
>It is almost 3 years old. Has the C++ portability situation
Hey boys... it's like the Manual: read till the end of the text
"Last modified February 1, 2001"
;-)
____________________________________
Gautier -- http://www.diax.ch/gdm/
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
@ 2001-02-22 10:40 gautier
0 siblings, 0 replies; 60+ messages in thread
From: gautier @ 2001-02-22 10:40 UTC (permalink / raw)
To: comp.lang.ada
>I would say it is a portability problem, if that extra memory requirements
>push you over some limit (physical, logical or contractural).
You're right. Maybe for the "practical protability" part of
the FAQ: "Don't use := for big object, because..."
____________________________________
Gautier -- http://www.diax.ch/gdm/
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
@ 2001-02-22 9:24 gautier
2001-02-22 10:21 ` Martin Dowie
0 siblings, 1 reply; 60+ messages in thread
From: gautier @ 2001-02-22 9:24 UTC (permalink / raw)
To: comp.lang.ada
Martin Dowie:
>Also, some compilers don't produce very efficient (in size) code for
>package body X is
> ...
> Y : Y_Type := (others => (...));
> ...
>end X;
Do you know one that does ? BTW I rather see a problem
in time. The expression "(others => (...))" is often built
in a nonoptimised manner, in an extra buffer, then copied in to Y.
But, it is not a portability problem : this feature *will work*
on any Ada compiler, although not too efficienty.
____________________________________
Gautier -- http://www.diax.ch/gdm/
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-22 9:24 gautier
@ 2001-02-22 10:21 ` Martin Dowie
0 siblings, 0 replies; 60+ messages in thread
From: Martin Dowie @ 2001-02-22 10:21 UTC (permalink / raw)
that would be Apex - haven't tried it on others
I would say it is a portability problem, if that extra memory requirements
push you over some limit (physical, logical or contractural).
<gautier@club.lemonde.fr> wrote in message
news:mailman.982833940.13855.comp.lang.ada@ada.eu.org...
Martin Dowie:
>Also, some compilers don't produce very efficient (in size) code for
>package body X is
> ...
> Y : Y_Type := (others => (...));
> ...
>end X;
Do you know one that does ? BTW I rather see a problem
in time. The expression "(others => (...))" is often built
in a nonoptimised manner, in an extra buffer, then copied in to Y.
But, it is not a portability problem : this feature *will work*
on any Ada compiler, although not too efficienty.
____________________________________
Gautier -- http://www.diax.ch/gdm/
^ permalink raw reply [flat|nested] 60+ messages in thread
* Ada to C++ translator?
@ 2001-02-09 19:17 Robert Brantley
2001-02-09 20:48 ` Britt Snodgrass
` (3 more replies)
0 siblings, 4 replies; 60+ messages in thread
From: Robert Brantley @ 2001-02-09 19:17 UTC (permalink / raw)
Any recommendations on a Ada to C++ translator? We have no Ada tasking
constructs to deal
with.
Thanks in advance,
Robert Brantley
robert.brantley@lmco.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-09 19:17 Robert Brantley
@ 2001-02-09 20:48 ` Britt Snodgrass
2001-02-09 23:35 ` Jeffrey Carter
2001-02-09 23:47 ` Brian Rogoff
2001-02-11 10:36 ` Gautier
` (2 subsequent siblings)
3 siblings, 2 replies; 60+ messages in thread
From: Britt Snodgrass @ 2001-02-09 20:48 UTC (permalink / raw)
Robert Brantley wrote:
>
> Any recommendations on a Ada to C++ translator? We have no Ada tasking
> constructs to deal with.
I doubt you'll get much help here. You should probably post this to
comp.lang.really_bad_ideas :)
Britt
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-09 20:48 ` Britt Snodgrass
@ 2001-02-09 23:35 ` Jeffrey Carter
2001-02-09 23:47 ` Brian Rogoff
1 sibling, 0 replies; 60+ messages in thread
From: Jeffrey Carter @ 2001-02-09 23:35 UTC (permalink / raw)
Robert Brantley wrote:
>
> Any recommendations on a Ada to C++ translator? We have no Ada tasking
> constructs to deal with.
Why do you want to increase the number of errors in your software?
--
Jeff Carter
"Sons of a silly person."
Monty Python & the Holy Grail
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-09 20:48 ` Britt Snodgrass
2001-02-09 23:35 ` Jeffrey Carter
@ 2001-02-09 23:47 ` Brian Rogoff
2001-02-12 15:07 ` Ted Dennison
1 sibling, 1 reply; 60+ messages in thread
From: Brian Rogoff @ 2001-02-09 23:47 UTC (permalink / raw)
On Fri, 9 Feb 2001, Britt Snodgrass wrote:
> Robert Brantley wrote:
> >
> > Any recommendations on a Ada to C++ translator? We have no Ada tasking
> > constructs to deal with.
>
> I doubt you'll get much help here. You should probably post this to
> comp.lang.really_bad_ideas :)
As much as I agree with the second statement (C++ is rather dreadful from
an Ada perspective, popularity notwithstanding :) I'll have to prove the
first wrong.
Averstar
http://www.averstar.com/services/IT_consulting.html
has some Ada -> C technology. That may be good enough.
http://www.ada2cc.com/
offers a program for this.
I haven't used either of these, nor do I imagine I ever will. Seems like a
step backwards.
-- Brian
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-09 23:47 ` Brian Rogoff
@ 2001-02-12 15:07 ` Ted Dennison
2001-02-12 15:49 ` Brian Rogoff
2001-02-12 20:25 ` David C. Hoos, Sr.
0 siblings, 2 replies; 60+ messages in thread
From: Ted Dennison @ 2001-02-12 15:07 UTC (permalink / raw)
In article <Pine.BSF.4.21.0102091527200.6785-100000@shell5.ba.best.com>,
Brian Rogoff <bpr@shell5.ba.best.com> wrote:
> On Fri, 9 Feb 2001, Britt Snodgrass wrote:
>
> > Robert Brantley wrote:
> > >
> > > Any recommendations on a Ada to C++ translator? We have no Ada
> > > tasking constructs to deal with.
> Averstar
> http://www.averstar.com/services/IT_consulting.html
> has some Ada -> C technology. That may be good enough.
>
> http://www.ada2cc.com/
> offers a program for this.
Those convert to C, not C++. For instance, neither would convert a
tagged type to a C++ class.
--
T.E.D.
http://www.telepath.com/~dennison/Ted/TED.html
Sent via Deja.com
http://www.deja.com/
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-12 15:07 ` Ted Dennison
@ 2001-02-12 15:49 ` Brian Rogoff
2001-02-13 19:36 ` Ted Dennison
2001-02-12 20:25 ` David C. Hoos, Sr.
1 sibling, 1 reply; 60+ messages in thread
From: Brian Rogoff @ 2001-02-12 15:49 UTC (permalink / raw)
On Mon, 12 Feb 2001, Ted Dennison wrote:
> In article <Pine.BSF.4.21.0102091527200.6785-100000@shell5.ba.best.com>,
> Brian Rogoff <bpr@shell5.ba.best.com> wrote:
> > On Fri, 9 Feb 2001, Britt Snodgrass wrote:
> >
> > > Robert Brantley wrote:
> > > >
> > > > Any recommendations on a Ada to C++ translator? We have no Ada
> > > > tasking constructs to deal with.
>
> > Averstar
> > http://www.averstar.com/services/IT_consulting.html
> > has some Ada -> C technology. That may be good enough.
> >
> > http://www.ada2cc.com/
> > offers a program for this.
>
> Those convert to C, not C++. For instance, neither would convert a
> tagged type to a C++ class.
I already mentioned that the Averstar technology converts to C. And unless
you know for a fact that the web page lies, www.ada2cc converts to C++
NOT C. Whether it does what you want with tagged types or not is
irrelevant; the generated code in their examples uses classes and
namepsaces, and they translate generics to templates. That's not C!
-- Brian
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-12 15:49 ` Brian Rogoff
@ 2001-02-13 19:36 ` Ted Dennison
0 siblings, 0 replies; 60+ messages in thread
From: Ted Dennison @ 2001-02-13 19:36 UTC (permalink / raw)
In article <Pine.BSF.4.21.0102120745010.11440-100000@shell5.ba.best.com>,
Brian
Rogoff says...
>
>On Mon, 12 Feb 2001, Ted Dennison wrote:
>> Those
convert to C, not C++. For instance, neither would convert a
>> tagged type to a
C++ class.
>
>... unless
>you know for a fact that the web page lies, www.ada2cc
converts to C++
Ahhh, no. I just assmed that their product name didn't lie (I'm
used to "cc"
being the name of the c compiler and "cpp" being the name of the
C++ compiler).
:-) My bad.
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
home email - mailto:dennison@telepath.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-12 15:07 ` Ted Dennison
2001-02-12 15:49 ` Brian Rogoff
@ 2001-02-12 20:25 ` David C. Hoos, Sr.
1 sibling, 0 replies; 60+ messages in thread
From: David C. Hoos, Sr. @ 2001-02-12 20:25 UTC (permalink / raw)
Ted,
Have you actually looked at the output of ada2cc?
It _does_ generate classes, even for untagged types,
and it generates templates for generics -- not found in
your everyday C compiler.
"Ted Dennison" <dennison@telepath.com> wrote in message
news:968u79$405$1@nnrp1.deja.com...
> In article <Pine.BSF.4.21.0102091527200.6785-100000@shell5.ba.best.com>,
> Brian Rogoff <bpr@shell5.ba.best.com> wrote:
> > On Fri, 9 Feb 2001, Britt Snodgrass wrote:
> >
> > > Robert Brantley wrote:
> > > >
> > > > Any recommendations on a Ada to C++ translator? We have no Ada
> > > > tasking constructs to deal with.
>
> > Averstar
> > http://www.averstar.com/services/IT_consulting.html
> > has some Ada -> C technology. That may be good enough.
> >
> > http://www.ada2cc.com/
> > offers a program for this.
>
> Those convert to C, not C++. For instance, neither would convert a
> tagged type to a C++ class.
>
> --
> T.E.D.
>
> http://www.telepath.com/~dennison/Ted/TED.html
>
>
> Sent via Deja.com
> http://www.deja.com/
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-09 19:17 Robert Brantley
2001-02-09 20:48 ` Britt Snodgrass
@ 2001-02-11 10:36 ` Gautier
2001-02-11 11:15 ` Pascal Obry
` (6 more replies)
2001-02-12 15:33 ` Ted Dennison
2001-02-15 23:09 ` Robert Brantley
3 siblings, 7 replies; 60+ messages in thread
From: Gautier @ 2001-02-11 10:36 UTC (permalink / raw)
Robert Brantley:
> Any recommendations on a Ada to C++ translator? We have no Ada tasking
> constructs to deal with.
Strange... Do you feel you are obliged to use
the Ada tasking just because this is available ?!
Or do you think you don't need Ada just because
there is no tasking in your program ?
In that case, it would be worth to try the
translation a couple of months, just to see the difference.
BTW, I'm looking for a device for transferring
my hard disk's contents onto punched cards. Does anyone
know such a device ?
__________________________________________
Gautier -- http://www.diax.ch/users/gdm/
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-11 10:36 ` Gautier
@ 2001-02-11 11:15 ` Pascal Obry
2001-02-11 11:15 ` Jean-Pierre Rosen
` (5 subsequent siblings)
6 siblings, 0 replies; 60+ messages in thread
From: Pascal Obry @ 2001-02-11 11:15 UTC (permalink / raw)
Gautier <xxx@yyy.zzz> writes:
> BTW, I'm looking for a device for transferring
> my hard disk's contents onto punched cards. Does anyone
> know such a device ?
I'll be glad to help if you provide the cards :) I don't feel like
handling kilometers of cards... What I do need is to put my swap
partition onto puched cards and find a fast and automated robot to
automagically put the right cards into the machine to load the
right page... the page must be laoded in less that 1ms.
Ah the pleasure to start from the wrong technology and start patching
and hacking it until it meets your needs !
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-11 10:36 ` Gautier
2001-02-11 11:15 ` Pascal Obry
@ 2001-02-11 11:15 ` Jean-Pierre Rosen
2001-02-12 10:36 ` David C. Hoos, Sr.
2001-02-11 13:15 ` Larry Kilgallen
` (4 subsequent siblings)
6 siblings, 1 reply; 60+ messages in thread
From: Jean-Pierre Rosen @ 2001-02-11 11:15 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 423 bytes --]
"Gautier" <xxx@yyy.zzz> a �crit dans le message news: 3A866B28.CE67B4A0@yyy.zzz...
> BTW, I'm looking for a device for transferring
> my hard disk's contents onto punched cards. Does anyone
> know such a device ?
>
Sure...
cp -R /* /dev/punch
:-)
--
---------------------------------------------------------
J-P. Rosen (Rosen.Adalog@wanadoo.fr)
Visit Adalog's web site at http://pro.wanadoo.fr/adalog
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-11 11:15 ` Jean-Pierre Rosen
@ 2001-02-12 10:36 ` David C. Hoos, Sr.
0 siblings, 0 replies; 60+ messages in thread
From: David C. Hoos, Sr. @ 2001-02-12 10:36 UTC (permalink / raw)
Well, since cp doesn't replicate symbolic links, I think
a better solution would be one of the following:
cd /
tar cvf /dev/punch ./
or, if cards are in short supply:
cd /
tar zcvf /dev/punch ./
;)
"Jean-Pierre Rosen" <rosen.adalog@wanadoo.fr> wrote in message
news:5cs569.a83.ln@skymaster.axlog.fr...
>
> "Gautier" <xxx@yyy.zzz> a �crit dans le message news:
3A866B28.CE67B4A0@yyy.zzz...
> > BTW, I'm looking for a device for transferring
> > my hard disk's contents onto punched cards. Does anyone
> > know such a device ?
> >
> Sure...
> cp -R /* /dev/punch
> :-)
>
> --
> ---------------------------------------------------------
> J-P. Rosen (Rosen.Adalog@wanadoo.fr)
> Visit Adalog's web site at http://pro.wanadoo.fr/adalog
>
>
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-11 10:36 ` Gautier
2001-02-11 11:15 ` Pascal Obry
2001-02-11 11:15 ` Jean-Pierre Rosen
@ 2001-02-11 13:15 ` Larry Kilgallen
2001-02-11 14:50 ` Ken Garlington
` (3 subsequent siblings)
6 siblings, 0 replies; 60+ messages in thread
From: Larry Kilgallen @ 2001-02-11 13:15 UTC (permalink / raw)
In article <3A866B28.CE67B4A0@yyy.zzz>, Gautier <xxx@yyy.zzz> writes:
> Robert Brantley:
>
>> Any recommendations on a Ada to C++ translator? We have no Ada tasking
>> constructs to deal with.
>
> Strange... Do you feel you are obliged to use
> the Ada tasking just because this is available ?!
I presumed he meant that automated translation of software
that did not use Ada tasking would be easier than doing so
for software that did use Ada tasking.
==============================================================================
Great Inventors of our time: Al Gore -> Internet; Sun Microsystems -> Clusters
==============================================================================
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-11 10:36 ` Gautier
` (2 preceding siblings ...)
2001-02-11 13:15 ` Larry Kilgallen
@ 2001-02-11 14:50 ` Ken Garlington
2001-02-11 15:58 ` Florian Weimer
` (2 subsequent siblings)
6 siblings, 0 replies; 60+ messages in thread
From: Ken Garlington @ 2001-02-11 14:50 UTC (permalink / raw)
"Gautier" <xxx@yyy.zzz> wrote in message news:3A866B28.CE67B4A0@yyy.zzz...
: Robert Brantley:
:
: > Any recommendations on a Ada to C++ translator? We have no Ada tasking
: > constructs to deal with.
:
: Strange... Do you feel you are obliged to use
: the Ada tasking just because this is available ?!
: Or do you think you don't need Ada just because
: there is no tasking in your program ?
: In that case, it would be worth to try the
: translation a couple of months, just to see the difference.
:
: BTW, I'm looking for a device for transferring
: my hard disk's contents onto punched cards. Does anyone
: know such a device ?
Well, that would be as silly as transferring it to magnetic tape! After all,
your tape drive is probably slower than your hard drive, and the tape is
likely to be less reliable as well!
(Oh, wait, people *do* still do that for backups. Never mind.)
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-11 10:36 ` Gautier
` (3 preceding siblings ...)
2001-02-11 14:50 ` Ken Garlington
@ 2001-02-11 15:58 ` Florian Weimer
2001-02-11 17:05 ` Aaro Koskinen
2001-02-15 23:47 ` Robert Brantley
6 siblings, 0 replies; 60+ messages in thread
From: Florian Weimer @ 2001-02-11 15:58 UTC (permalink / raw)
Gautier <xxx@yyy.zzz> writes:
> BTW, I'm looking for a device for transferring
> my hard disk's contents onto punched cards. Does anyone
> know such a device ?
Ask some who is still using a Monotype typesetting machine. He'll
probably have such a beast.
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-11 10:36 ` Gautier
` (4 preceding siblings ...)
2001-02-11 15:58 ` Florian Weimer
@ 2001-02-11 17:05 ` Aaro Koskinen
2001-02-15 23:47 ` Robert Brantley
6 siblings, 0 replies; 60+ messages in thread
From: Aaro Koskinen @ 2001-02-11 17:05 UTC (permalink / raw)
Gautier <xxx@yyy.zzz> writes:
> BTW, I'm looking for a device for transferring
> my hard disk's contents onto punched cards. Does anyone
> know such a device ?
Yes, in *BSD systems you can say "bcd < /dev/hdXd".
--
Aaro Koskinen, aaro@iki.fi, http://www.iki.fi/aaro
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-11 10:36 ` Gautier
` (5 preceding siblings ...)
2001-02-11 17:05 ` Aaro Koskinen
@ 2001-02-15 23:47 ` Robert Brantley
2001-02-16 15:20 ` Ted Dennison
6 siblings, 1 reply; 60+ messages in thread
From: Robert Brantley @ 2001-02-15 23:47 UTC (permalink / raw)
Gautier wrote:
> Strange... Do you feel you are obliged to use
> the Ada tasking just because this is available ?!
> Or do you think you don't need Ada just because
> there is no tasking in your program ?
No there is a tasking involved. No Ada tasking keywords to deal with though.
They didn't use the Ada tasking manager when they originally developed the
code,
apparently because it was to slow.
Robert Brantley
robert.brantley@lmco.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-15 23:47 ` Robert Brantley
@ 2001-02-16 15:20 ` Ted Dennison
[not found] ` <cyik6.1725$DE.61421700@newssvr10-int.news.prodigy.com>
0 siblings, 1 reply; 60+ messages in thread
From: Ted Dennison @ 2001-02-16 15:20 UTC (permalink / raw)
In article <3A8C6AA3.3F90043D@lmco.com>, Robert Brantley says...
>They didn't use the Ada tasking manager when they originally developed the
>code, apparently because it was to slow.
Heh. Not likely. Ada tasking execs generally fall into one of two categories:
1) Uses the OS "threading" capabilities.
In this case, it will be pretty much *exactly* the same speed in task
switching as the OS. The main difference is that the Ada tasking exec is
debugged already, while a custom one you make you will have to debug
yourself.
2) Uses its own tasking code within a single OS process/thread.
This is usually significantly *faster* that OS threads, since it generally
doesn't incur a lot of system call overhead, as well as overhead for all
the extra fancy features an OS process/thread scheduler has to support.
More likely is that they didn't use Ada tasking becuase they needed real-time
performance, and Ada83 didn't support real-time tasking very well (it lacked the
"delay until" feature).
Its a shame you can't just rewite the Ada83 code in Ada95 instead of C++. It is
actually possible to write a *portable* real-time scheduler in Ada95 (no OS
calls whatsoever). The project I'm working on has actually done this. With C++
you are going to have to go through this same painful porting effort every time
you switch platforms. I don't envy you at all.
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
home email - mailto:dennison@telepath.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-09 19:17 Robert Brantley
2001-02-09 20:48 ` Britt Snodgrass
2001-02-11 10:36 ` Gautier
@ 2001-02-12 15:33 ` Ted Dennison
2001-02-15 23:37 ` Robert Brantley
2001-02-15 23:09 ` Robert Brantley
3 siblings, 1 reply; 60+ messages in thread
From: Ted Dennison @ 2001-02-12 15:33 UTC (permalink / raw)
In article <3A844255.24A4DBA3@lmco.com>,
Robert Brantley <robert.brantley@lmco.com> wrote:
> Any recommendations on a Ada to C++ translator? We have no Ada
> tasking constructs to deal with.
(sigh) Poor guy.
As you have probably gathered from all the snide comments, there isn't a
program to do this. There are some around for C, but none for C++. The
best I can think of would be to use one of those UML reverse-engieering
tools to get UML from Ada, then use its code generator to spit back out
C++. But I wouldn't suggest doing that. Most likely you'll just end up
with the biggest mess the world has seen since my 3-year-old got into my
old wargame boxes.
I'd say we could probably provide more help if you told us what you are
trying to accomplish by doing that, but that would probably just be
opening yourself up to more abuse (when most likely its your managment
that deserves the abuse).
Translation tools can be used successfully in some circumstances, but
they won't generally produce the kind of code you'd want to have to
maintain for years to come. Most of the time some stuff won't translate
very well, and will have to be hand-massaged on the output or on the
input side. The process will probably introduce some new bugs, so you
will have to redo all the code's testing, debugging, and acceptance
phases. If the code is mission-critical, you will also want someone to
go over the output with a fine-toothed comb to mare sure there aren't
any obscure lurking nasties. Odds are any good developer who has to go
through all this is going to be sorely tempted to rewrite the code
anyway to make it into more idomatic C++. So its not going to be easy or
cheap. Thus translation should be used as an emergency last resort, not
as a magic wand.
Now, I hate to join the Greek chorus here, but is it *truly* that much
of an emergency? The only reason I could think of that would ever make
it worth the effort would be if there were a platform out there that I
*had* to use for some reason that had no Ada (or C) compiler available
for it.
--
T.E.D.
http://www.telepath.com/~dennison/Ted/TED.html
Sent via Deja.com
http://www.deja.com/
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-12 15:33 ` Ted Dennison
@ 2001-02-15 23:37 ` Robert Brantley
2001-02-16 0:34 ` tmoran
` (2 more replies)
0 siblings, 3 replies; 60+ messages in thread
From: Robert Brantley @ 2001-02-15 23:37 UTC (permalink / raw)
Ted Dennison wrote:
> Most likely you'll just end up
> with the biggest mess the world has seen since my 3-year-old got into my
> old wargame boxes.
I got mine buried in the closet so they can't get at them.
>
> I'd say we could probably provide more help if you told us what you are
> trying to accomplish by doing that, but that would probably just be
> opening yourself up to more abuse (when most likely its your managment
> that deserves the abuse).
>
We are re-using code from a legacy system, and we have spent a lot of
effort on binding this legacy Ada code to the RTOS we are using. As the
work
has progressed it has become increasing apparent how much work is involved
in mating the Ada code to the RTOS and the RTOS's development tools. A
great
deal of complexity could be cut out if we move the application code to the
RTOS
native language or it's derivative C++.
There are also other pressures outside software development concerns pushing
us
toward C++. The quality and price of available tool, hiring, etc.
The ideal was to see if we could automate the process of conversion as much
as
possible, we realize a 100%, or even 90%, mapping from one language to the
other
is impossible.
Robert Brantley
robert.brantley@lmco.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-15 23:37 ` Robert Brantley
@ 2001-02-16 0:34 ` tmoran
2001-02-16 4:59 ` Lao Xiao Hai
2001-02-16 11:02 ` Tarjei T. Jensen
2001-02-16 15:44 ` Ted Dennison
2 siblings, 1 reply; 60+ messages in thread
From: tmoran @ 2001-02-16 0:34 UTC (permalink / raw)
>We are re-using code from a legacy system, and we have spent a lot of
>effort on binding this legacy Ada code to the RTOS we are using.
I don't quite understand the situation: You had N lines of Ada running,
using an old RTOS, and now you are moving to a new RTOS and finding there
were M system calls that need changing, and M is a painfully large number.
The proposal is to convert to C/C++, which saves writing "pragma Import"
etc for the system calls. If the automated conversion handles 90%, you
are left with N/10 things to manually fix, and I would think N/10 >> M.
If the system calls of the new RTOS are even slightly different, which
presumably they are or the problem wouldn't exist, you'll still have to do
work on them, even if they're now written in C. If the structure of the
RTOS is different, you'll also have to change the structure of the app,
whether it's in C or Ada, and that's almost sure to be worse with a
(semi)mechanically translated C than with the original, lucid(?) Ada. If
the number of *different* system calls is not high, wouldn't it be easier
to just create a layer that translates old RTOS calls into new RTOS calls?
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-16 0:34 ` tmoran
@ 2001-02-16 4:59 ` Lao Xiao Hai
2001-02-16 15:20 ` Marin David Condic
0 siblings, 1 reply; 60+ messages in thread
From: Lao Xiao Hai @ 2001-02-16 4:59 UTC (permalink / raw)
tmoran@acm.org wrote:
> >We are re-using code from a legacy system, and we have spent a lot of
> >effort on binding this legacy Ada code to the RTOS we are using.
> I don't quite understand the situation: You had N lines of Ada running,
> using an old RTOS, and now you are moving to a new RTOS and finding there
> were M system calls that need changing, and M is a painfully large number.
> The proposal is to convert to C/C++, which saves writing "pragma Import"
> etc for the system calls. [snipped the rest of Tom's message ... ]
This is not an uncommon with Ada 95. We have several clients using RTOS's
that were supported under Ada 83 but are not supported with Ada 95. In
particular, the newer version of the RTOS is not supported under Ada 95 and
may be awkward, at best, trying to execute the older Ada 83 code.
For some of these RTOS (e.g., HP-RT), the developers have few options except
C or C++. There simply is no Ada 95 available for the platform. In the
HP-RT
example, Alsys, the original Ada compiler publisher is gone and its successor,
Aonix,
has no economic incentive to upgrade the compiler to Ada 95 for the new RTOS.
With the abrogation of the Ada "mandate" there are quite a few of these
unsupported
platforms for Ada 95. Since the DoD contractor is not required to use Ada,
they
have no incentive to purchase a compiler. Since they have not incentive to
purchase
a compiler, the compiler publisher has no incentive to produce a compiler.
This is
especially true for those small, seldom used platforms that are so specialized
that the
market is lean for them. We have a lot of specialized military computers
still in
service (and being upgraded) for which is little likelihood of there ever
being an
Ada 95 compiler. There ought to be since these are often safety-critical.
However,
many DoD program managers have concluded that Ada is no longer relevant.
With
this kind of stupidity on the increase, compiler publishers are forced to take
the path of
best ROI.
Richard Riehle
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-16 4:59 ` Lao Xiao Hai
@ 2001-02-16 15:20 ` Marin David Condic
0 siblings, 0 replies; 60+ messages in thread
From: Marin David Condic @ 2001-02-16 15:20 UTC (permalink / raw)
"Lao Xiao Hai" <laoxhai@ix.netcom.com> wrote in message
news:3A8CB3BE.B4DAB0BE@ix.netcom.com...
> With the abrogation of the Ada "mandate" there are quite a few of these
> unsupported
> platforms for Ada 95. Since the DoD contractor is not required to use
Ada,
> they
> have no incentive to purchase a compiler. Since they have not incentive
to
> purchase
> a compiler, the compiler publisher has no incentive to produce a compiler.
> This is
> especially true for those small, seldom used platforms that are so
specialized
> that the
> market is lean for them. We have a lot of specialized military
computers
> still in
> service (and being upgraded) for which is little likelihood of there ever
> being an
> Ada 95 compiler. There ought to be since these are often
safety-critical.
> However,
> many DoD program managers have concluded that Ada is no longer relevant.
> With
> this kind of stupidity on the increase, compiler publishers are forced to
take
> the path of
> best ROI.
>
There is definitely a "Catch 22" situation with Ada compilers in this and
other areas. It's tough to generate the critical mass needed to make Ada
more popular - especially in the embedded world where there is such a big
dependency on tools other than the compiler.
One thing that might help considerably would be to get Ada front-ends onto
more of the embedded compilers already available. For example, there are
lots of embedded projects that are using the gcc compiler in some manner.
Last I checked the web site (http://www.gnu.org/software/gcc/gcc.html) for
gcc, they were claiming 6 language front ends built into the compiler. (O.K.
3 of them are C derivatives.) Ada, Pascal, Cobol, et alia are mentioned, but
are not part of the release. It seems to me that if Ada were part of the
standard gcc release, then at least there is the possibility of a project
that uses gcc to find a way to utilize Ada. Maybe one day "Real Soon Now"
this will happen. Until it does, it becomes very hard for embedded projects
to consider Ada if/when some part of the target environment changes and
there is no Ada toolset available to do the job. (And I'm terribly sorry to
inform the vendors that we just can't afford to pay them to rewrite their
compilers & toolsets if there is a less expensive option open to us. :-)
BTW: Green Hills (http://www.ghs.com/products.html) mentions they have
products for C/C++ and Ada development for embedded targets so there is a
choice for some platforms. Why the number of Ada targets is less than the
number of C/C++ targets, I do not know. It would seem that if the compiler
front-end & intermediate code supports Ada, that all the same targets should
work for either language. (Maybe it is the RTK or RTOS?) IMHO, a
proliferation of Ada front-ends would go a long way to gaining that critical
mass. Availability is a necessary (but not sufficient) condition for
success.
MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas www.pacemicro.com
Enabling the digital revolution
e-Mail: marin.condic@pacemicro.com
Web: http://www.mcondic.com/
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-15 23:37 ` Robert Brantley
2001-02-16 0:34 ` tmoran
@ 2001-02-16 11:02 ` Tarjei T. Jensen
2001-02-16 13:34 ` Ken Garlington
2001-02-16 15:44 ` Ted Dennison
2 siblings, 1 reply; 60+ messages in thread
From: Tarjei T. Jensen @ 2001-02-16 11:02 UTC (permalink / raw)
Robert Brantley wrote >
>We are re-using code from a legacy system, and we have spent a lot of
>effort on binding this legacy Ada code to the RTOS we are using. As the
>work
>has progressed it has become increasing apparent how much work is involved
>in mating the Ada code to the RTOS and the RTOS's development tools. A
>great
>deal of complexity could be cut out if we move the application code to the
>RTOS
>native language or it's derivative C++.
Perhaps the following table from
http://www.rtcgroup.com/cotsjournal/cots7800/cots7800p60.html might be of
interest when you discuss the costs of using Ada. BTW Don't expect better
numbers from C++.
|language | Lines /| Errors / | Time / | Total / |
| | Error | 10,000 Lines | Error | 10,000 (hours)|
|---------+--------+--------------+---------+---------------|
| Ada | 270 | 37 | 20 min | 12.35 hours |
|---------+--------+--------------+---------+---------------|
| C | 80 | 125 | 240 min | 500 hours |
+-----------------------------------------------------------+
Remember time is subjective. You don't really know how much time you spend
unless you measure.
Greetings,
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-16 11:02 ` Tarjei T. Jensen
@ 2001-02-16 13:34 ` Ken Garlington
2001-02-16 14:55 ` Marin David Condic
2001-02-16 21:04 ` tmoran
0 siblings, 2 replies; 60+ messages in thread
From: Ken Garlington @ 2001-02-16 13:34 UTC (permalink / raw)
Don't expect C++ to have better productivity numbers than C? Seems like a
statement that needs to be defended with data to me...
IMO, this thread is one of the reasons why Ada is so hard to sell. There are
so many claims that Ada is "obviously" better than all other options in all
other circumstances that it makes me cringe. Don't get me wrong -- I love
Ada -- but advocates hype it so hard that it sounds like used-car salesmen.
We have built products in both C and Ada; our data doesn't show a *12-to-1*
difference in debug times!
"Tarjei T. Jensen" <tarjei.jensen@kvaerner.com> wrote in message
news:96j1bo$723@news.kvaerner.com...
:
: Robert Brantley wrote >
: >We are re-using code from a legacy system, and we have spent a lot of
: >effort on binding this legacy Ada code to the RTOS we are using. As the
: >work
: >has progressed it has become increasing apparent how much work is
involved
: >in mating the Ada code to the RTOS and the RTOS's development tools. A
: >great
: >deal of complexity could be cut out if we move the application code to
the
: >RTOS
: >native language or it's derivative C++.
:
: Perhaps the following table from
: http://www.rtcgroup.com/cotsjournal/cots7800/cots7800p60.html might be of
: interest when you discuss the costs of using Ada. BTW Don't expect better
: numbers from C++.
:
: |language | Lines /| Errors / | Time / | Total / |
: | | Error | 10,000 Lines | Error | 10,000 (hours)|
: |---------+--------+--------------+---------+---------------|
: | Ada | 270 | 37 | 20 min | 12.35 hours |
: |---------+--------+--------------+---------+---------------|
: | C | 80 | 125 | 240 min | 500 hours |
: +-----------------------------------------------------------+
:
: Remember time is subjective. You don't really know how much time you spend
: unless you measure.
:
:
: Greetings,
:
:
:
:
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-16 13:34 ` Ken Garlington
@ 2001-02-16 14:55 ` Marin David Condic
2001-02-16 21:04 ` tmoran
1 sibling, 0 replies; 60+ messages in thread
From: Marin David Condic @ 2001-02-16 14:55 UTC (permalink / raw)
"Ken Garlington" <Ken.Garlington@computer.org> wrote in message
news:e%9j6.251$uU2.28276829@newssvr16.news.prodigy.com...
> Don't expect C++ to have better productivity numbers than C? Seems like a
> statement that needs to be defended with data to me...
>
> IMO, this thread is one of the reasons why Ada is so hard to sell. There
are
> so many claims that Ada is "obviously" better than all other options in
all
> other circumstances that it makes me cringe. Don't get me wrong -- I love
> Ada -- but advocates hype it so hard that it sounds like used-car
salesmen.
> We have built products in both C and Ada; our data doesn't show a
*12-to-1*
> difference in debug times!
>
While I basically agree that hype and exageration do not help "The Cause", I
think it is important to note the YMMV caveat. If you have experienced Ada
developers who are writing code in C/C++, chances are they are going to
avoid the "Stupid C Tricks" and work effectively with the software design to
make sure it is a solid piece of C code. If you are talking about "typical"
C code (especially that which may have been developed several years ago) you
might get drastically different results.
Most C code I have encountered is pretty lousy because your garden variety C
programmer tends to have more of an assembly language mentality and/or is
enamoured with the conciseness and cleverness possible within the language.
They tend to have the attitude that "this ought to be understood by any
*competent* C programmer!!!" with no regard for the economics involved. (You
can't always have a team of "competent" C programmers and it doesn't make
the company any money to have someone stopping in the middle of reading some
code to go delving into C manuals to decrypt your obscure "clever" code. In
other words, clear, simple, idiot-proof code may not be as interesting to
write, but it MAKES MONEY!)
So it may be hard to draw across-the-board conclusions about C/C++ v Ada in
terms of the economics, but I have no trouble believing that within some env
ironments there may very well be a 12/1 ratio. The only way to know for sure
is to measure locally. And of course there are environments wherein bugs
don't matter much so there is less concern over the maintenance cost. One
needs to consider lots of factors in making judgements about the economics
of a given technology.
MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas www.pacemicro.com
Enabling the digital revolution
e-Mail: marin.condic@pacemicro.com
Web: http://www.mcondic.com/
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-16 13:34 ` Ken Garlington
2001-02-16 14:55 ` Marin David Condic
@ 2001-02-16 21:04 ` tmoran
1 sibling, 0 replies; 60+ messages in thread
From: tmoran @ 2001-02-16 21:04 UTC (permalink / raw)
>We have built products in both C and Ada; our data doesn't show a *12-to-1*
>difference in debug times!
Can you make that data public?
It would certainly be much more convincing to see 100 different
organizations' data showing everything from .5-to-1 to 12-to-1 with
an average of, say, 1.2-to-1. Currently the public data is effectively
a censored distribution, with only the "Ada better" outliers mentioned
on c.l.a. (and perhaps the "C++ better" outliers mentioned there?).
A small N consisting solely of points selected to bolster a case, is
never very convincing.
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-15 23:37 ` Robert Brantley
2001-02-16 0:34 ` tmoran
2001-02-16 11:02 ` Tarjei T. Jensen
@ 2001-02-16 15:44 ` Ted Dennison
2001-02-21 13:21 ` Bob Jacobs
2 siblings, 1 reply; 60+ messages in thread
From: Ted Dennison @ 2001-02-16 15:44 UTC (permalink / raw)
In article <3A8C6843.B46006D6@lmco.com>, Robert Brantley says...
>Ted Dennison wrote:
>
>> Most likely you'll just end up
>> with the biggest mess the world has seen since my 3-year-old got into my
>> old wargame boxes.
>
>I got mine buried in the closet so they can't get at them.
That's what I thought too. :-(
>We are re-using code from a legacy system, and we have spent a lot of
>effort on binding this legacy Ada code to the RTOS we are using. As the
>work
>has progressed it has become increasing apparent how much work is involved
>in mating the Ada code to the RTOS and the RTOS's development tools. A
>great
>deal of complexity could be cut out if we move the application code to the
>RTOS
>native language or it's derivative C++.
Out of curiosity, what compiler and RTOS? Your Ada vendor ought to have bindings
to the OS provided with the compiler.
Even without them, C bindings are trivial to write, once you get the hang of it.
Its certianly far less effort than a language port!
And I don't see how having a C++ port is that going to help you the next time
you port to a new system. Odds are you are actually *better off* right now with
the Ada sources than you would have been with C++ sources. At least the Ada
language itself is portable. C++ can't even say that much. The C++ porting guide
for Mozilla forbids using quite a few *core* language features (templates,
static constructors, exceptions, namespaces, among others) due to portability
issues. You can see
http://www.mozilla.org/hacking/portable-cpp.html for the whole list. If you *do*
port to C++, you'd do well to read and follow it.
>The ideal was to see if we could automate the process of conversion as much
>as possible, we realize a 100%, or even 90%, mapping from one language to the
>other is impossible.
Good. You at least need to be somewhat realistic about what you are getting
yourself into.
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
home email - mailto:dennison@telepath.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-16 15:44 ` Ted Dennison
@ 2001-02-21 13:21 ` Bob Jacobs
2001-02-21 14:14 ` Ted Dennison
2001-02-21 15:58 ` Martin Dowie
0 siblings, 2 replies; 60+ messages in thread
From: Bob Jacobs @ 2001-02-21 13:21 UTC (permalink / raw)
Ted Dennison wrote:
>
> And I don't see how having a C++ port is that going to help you the next time
> you port to a new system. Odds are you are actually *better off* right now with
> the Ada sources than you would have been with C++ sources. At least the Ada
> language itself is portable. C++ can't even say that much. The C++ porting guide
> for Mozilla forbids using quite a few *core* language features (templates,
> static constructors, exceptions, namespaces, among others) due to portability
> issues. You can see
> http://www.mozilla.org/hacking/portable-cpp.html for the whole list. If you *do*
> port to C++, you'd do well to read and follow it.
The last time I checked, which was only a few weeks ago, the Mozilla
guide was so dated that it's pretty much useless.
Bob Jacobs
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-21 13:21 ` Bob Jacobs
@ 2001-02-21 14:14 ` Ted Dennison
2001-02-21 14:59 ` Bob Jacobs
2001-02-21 15:58 ` Martin Dowie
1 sibling, 1 reply; 60+ messages in thread
From: Ted Dennison @ 2001-02-21 14:14 UTC (permalink / raw)
In article <3A93C0DC.37A37955@baesystems.com>, Bob Jacobs says...
>
>The last time I checked, which was only a few weeks ago, the Mozilla
>guide was so dated that it's pretty much useless.
It is almost 3 years old. Has the C++ portability situation drasticly improved
since it was written? Since portability is actively *against* certain large
vendor's interests, I'd be suprised if that were the case. But I don't know the
C++ world enough to judge myself.
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
home email - mailto:dennison@telepath.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-21 14:14 ` Ted Dennison
@ 2001-02-21 14:59 ` Bob Jacobs
0 siblings, 0 replies; 60+ messages in thread
From: Bob Jacobs @ 2001-02-21 14:59 UTC (permalink / raw)
Ted Dennison wrote:
>
> In article <3A93C0DC.37A37955@baesystems.com>, Bob Jacobs says...
> >
> >The last time I checked, which was only a few weeks ago, the Mozilla
> >guide was so dated that it's pretty much useless.
>
> It is almost 3 years old. Has the C++ portability situation drasticly improved
> since it was written? Since portability is actively *against* certain large
> vendor's interests, I'd be suprised if that were the case. But I don't know the
> C++ world enough to judge myself.
The situation has improved greatly over the last 3 years IMHO and
support for the core language features you mentioned is much better than
it was at the time the Mozilla guide was written.
I'm not aware of any C++ compiler which can yet claim to be truly 100%
compliant with the C++ standard but many now come close and are getting
closer.
Bob Jacobs
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-21 13:21 ` Bob Jacobs
2001-02-21 14:14 ` Ted Dennison
@ 2001-02-21 15:58 ` Martin Dowie
2001-02-21 16:15 ` Bob Jacobs
1 sibling, 1 reply; 60+ messages in thread
From: Martin Dowie @ 2001-02-21 15:58 UTC (permalink / raw)
That's what I thought too when I first went to the page as it has "27 March
1998" at the top.
Look down at the very bottom though and you will descover it is still being
maintained and the
last change was on "2-01-2001" i.e. all rules listed _still_ apply!
"Bob Jacobs" <robert.jacobs@baesystems.com> wrote in message
news:3A93C0DC.37A37955@baesystems.com...
>
>
> Ted Dennison wrote:
> >
> > And I don't see how having a C++ port is that going to help you the next
time
> > you port to a new system. Odds are you are actually *better off* right
now with
> > the Ada sources than you would have been with C++ sources. At least the
Ada
> > language itself is portable. C++ can't even say that much. The C++
porting guide
> > for Mozilla forbids using quite a few *core* language features
(templates,
> > static constructors, exceptions, namespaces, among others) due to
portability
> > issues. You can see
> > http://www.mozilla.org/hacking/portable-cpp.html for the whole list. If
you *do*
> > port to C++, you'd do well to read and follow it.
>
>
> The last time I checked, which was only a few weeks ago, the Mozilla
> guide was so dated that it's pretty much useless.
>
> Bob Jacobs
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-21 15:58 ` Martin Dowie
@ 2001-02-21 16:15 ` Bob Jacobs
2001-02-21 16:57 ` Ted Dennison
` (2 more replies)
0 siblings, 3 replies; 60+ messages in thread
From: Bob Jacobs @ 2001-02-21 16:15 UTC (permalink / raw)
Martin Dowie wrote:
>
> That's what I thought too when I first went to the page as it has "27 March
> 1998" at the top.
> Look down at the very bottom though and you will descover it is still being
> maintained and the
> last change was on "2-01-2001" i.e. all rules listed _still_ apply!
[ Martin and I discussed this recently in another forum :-) ]
Granted that the page has been updated but I still assert that the
information contained within it is dated. The revision history suggests
that it has simply been added to, rather than revised, though there is
little to go on.
Bob Jacobs
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-21 16:15 ` Bob Jacobs
@ 2001-02-21 16:57 ` Ted Dennison
2001-02-22 1:39 ` Andrew Berg
2001-02-22 9:09 ` Martin Dowie
2001-02-22 9:17 ` Martin Dowie
2 siblings, 1 reply; 60+ messages in thread
From: Ted Dennison @ 2001-02-21 16:57 UTC (permalink / raw)
In article <3A93E9A9.21F2F44F@baesystems.com>, Bob Jacobs says...
>
>[ Martin and I discussed this recently in another forum :-) ]
>
>Granted that the page has been updated but I still assert that the
>information contained within it is dated. The revision history suggests
>that it has simply been added to, rather than revised, though there is
>little to go on.
I've sent an email to the maintainers asking their opinion on the subject. I'll
report back when I get a response. I'm inclined to accept what they say, as
Mozilla is to my knowledge the largest (and most ported) portable C++ program
for which we are liable to find this kind of public information.
I tried reading it with revisions visible (click "document history" at the
bottom), and that does seem to support Bob's case. I can't find any deletions,
and the only modifications have been updates of URLs. However, another possible
hypothesis is that the situation has indeed not improved in the last 3 years. A
variation on this would be the hypothesis that the need to support older C++
compilers will imply that restrictions can *never* be removed.
We'll see what the maintainers say.
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
home email - mailto:dennison@telepath.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-21 16:57 ` Ted Dennison
@ 2001-02-22 1:39 ` Andrew Berg
0 siblings, 0 replies; 60+ messages in thread
From: Andrew Berg @ 2001-02-22 1:39 UTC (permalink / raw)
I write a lot of C++, and unless I am writing for a single, known
compiler, I tend to follow their porting rules. Why is this? Mainly
because even if I have the latest and greatest tools, or even just gcc,
it is unlikely that everyone else will also. Besides that: Templates,
rtti and exceptions, when used in C++ create binaries that are
appreciably larger. Well, at least they are with g++, which is what I
am currently using for development.
Having said that, I think that I would kick and scream before giving up
the STL now that I've gotten used to it. It is not so much that it is
that good, rather it is just that much better.
Mozilla is really not written in C++. It is really written in C, with
classes.
-andrew
Ted Dennison wrote:
>
> In article <3A93E9A9.21F2F44F@baesystems.com>, Bob Jacobs says...
> >
> >[ Martin and I discussed this recently in another forum :-) ]
> >
> >Granted that the page has been updated but I still assert that the
> >information contained within it is dated. The revision history suggests
> >that it has simply been added to, rather than revised, though there is
> >little to go on.
>
> I've sent an email to the maintainers asking their opinion on the subject. I'll
> report back when I get a response. I'm inclined to accept what they say, as
> Mozilla is to my knowledge the largest (and most ported) portable C++ program
> for which we are liable to find this kind of public information.
>
> I tried reading it with revisions visible (click "document history" at the
> bottom), and that does seem to support Bob's case. I can't find any deletions,
> and the only modifications have been updates of URLs. However, another possible
> hypothesis is that the situation has indeed not improved in the last 3 years. A
> variation on this would be the hypothesis that the need to support older C++
> compilers will imply that restrictions can *never* be removed.
>
> We'll see what the maintainers say.
>
> ---
> T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
> home email - mailto:dennison@telepath.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-21 16:15 ` Bob Jacobs
2001-02-21 16:57 ` Ted Dennison
@ 2001-02-22 9:09 ` Martin Dowie
2001-02-22 13:32 ` Bob Jacobs
2001-02-22 14:30 ` Ted Dennison
2001-02-22 9:17 ` Martin Dowie
2 siblings, 2 replies; 60+ messages in thread
From: Martin Dowie @ 2001-02-22 9:09 UTC (permalink / raw)
I suspect for the mainstream of Windows C++ suites (e.g. Visual C++,
Borland), the guide is dated and you could probably delete large chunks
of this guide but only if you knew that was your entire porting range. But
mozilla's porting range is huge and a lot of the rules seem to apply
because of HP and SCO compilers - which I had expected to be fairly
common targets...
This sort of thing isn't limited to C++ though, just now my porting range
includes Green Hills AdaMULTI v2 for PowerPC, which doesn't cope
with 64-bit integers as well as GNAT does. Can't wait for v3 to drop on
my doorstep!..
Also, some compilers don't produce very efficient (in size) code for
package body X is
...
Y : Y_Type := (others => (...));
...
end X;
and it is usually necessary to change this to
package body X is
...
Y : Y_Type;
...
procedure Initialise is
begin
for Index in Y'Range loop
Y(Index) := (...);
end loop;
end Initialise;
end X;
one could say they were 'irrational' about it ;-)
anyone else got any porting tips - maybe we could start a FAQ for these
sort of things?..
Bob Jacobs <robert.jacobs@baesystems.com> wrote in message
news:3A93E9A9.21F2F44F@baesystems.com...
>
> Martin Dowie wrote:
> >
> > That's what I thought too when I first went to the page as it has "27
March
> > 1998" at the top.
> > Look down at the very bottom though and you will descover it is still
being
> > maintained and the
> > last change was on "2-01-2001" i.e. all rules listed _still_ apply!
>
> [ Martin and I discussed this recently in another forum :-) ]
>
> Granted that the page has been updated but I still assert that the
> information contained within it is dated. The revision history suggests
> that it has simply been added to, rather than revised, though there is
> little to go on.
>
> Bob Jacobs
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-22 9:09 ` Martin Dowie
@ 2001-02-22 13:32 ` Bob Jacobs
2001-02-22 14:30 ` Ted Dennison
1 sibling, 0 replies; 60+ messages in thread
From: Bob Jacobs @ 2001-02-22 13:32 UTC (permalink / raw)
Martin Dowie wrote:
>
> I suspect for the mainstream of Windows C++ suites (e.g. Visual C++,
> Borland), the guide is dated and you could probably delete large chunks
> of this guide but only if you knew that was your entire porting range. But
> mozilla's porting range is huge and a lot of the rules seem to apply
> because of HP and SCO compilers - which I had expected to be fairly
> common targets...
A weakness of the guide is that in most cases it doesn't provide the
version of the compilers which are mentioned. Since it was first
published there has been a great deal of activity on the part of
compiler writers to implement the standard. This doesn't seem to have
been reflected in the guide.
An example of it being dated is the HP compiler, to which you also
refer. This is identified in 9 of the 33 items; some of these refer to
it being a Cfront compiler, which it says is still shipping. According
to the HP site at:
http://www.devresource.hp.com/devresource/Tools/cpp/faq.html
the Cfront C++ compiler stopped shipping in August 1999.
One of the few compilers mentioned by version is Visual C++ 1.5 but I
believe this is the old 16-bit compiler which stopped shipping probably
around 4 or 5 years ago now. Fine if you still want to support Windows
3.X.
It may be that Mozilla is still supporting obscure platforms using old
compilers, and all credit to them if they are. On the other hand, it
could just be that the guide is out of date and needs revising.
Bob Jacobs
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-22 9:09 ` Martin Dowie
2001-02-22 13:32 ` Bob Jacobs
@ 2001-02-22 14:30 ` Ted Dennison
1 sibling, 0 replies; 60+ messages in thread
From: Ted Dennison @ 2001-02-22 14:30 UTC (permalink / raw)
In article <3a94d54c$1@pull.gecm.com>, Martin Dowie says...
>This sort of thing isn't limited to C++ though, just now my porting range
>includes Green Hills AdaMULTI v2 for PowerPC, which doesn't cope
>with 64-bit integers as well as GNAT does. Can't wait for v3 to drop on
Well yeah, but basic features like generics and exceptions still work portably!
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
home email - mailto:dennison@telepath.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-21 16:15 ` Bob Jacobs
2001-02-21 16:57 ` Ted Dennison
2001-02-22 9:09 ` Martin Dowie
@ 2001-02-22 9:17 ` Martin Dowie
2 siblings, 0 replies; 60+ messages in thread
From: Martin Dowie @ 2001-02-22 9:17 UTC (permalink / raw)
Hi Bob! :-)
Bob Jacobs <robert.jacobs@baesystems.com> wrote in message
news:3A93E9A9.21F2F44F@baesystems.com...
>
> [ Martin and I discussed this recently in another forum :-) ]
>
> Granted that the page has been updated but I still assert that the
> information contained within it is dated. The revision history suggests
> that it has simply been added to, rather than revised, though there is
> little to go on.
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C++ translator?
2001-02-09 19:17 Robert Brantley
` (2 preceding siblings ...)
2001-02-12 15:33 ` Ted Dennison
@ 2001-02-15 23:09 ` Robert Brantley
3 siblings, 0 replies; 60+ messages in thread
From: Robert Brantley @ 2001-02-15 23:09 UTC (permalink / raw)
Wow, I didn't expect this many posts in response.
Thanks to everyone that replied here or by mail, sorry I didn't make it
back to read the responses earlier.
Robert Brantley
robert.brantley@lmco.com
^ permalink raw reply [flat|nested] 60+ messages in thread
* Ada to C translator ?
@ 1998-02-04 0:00 Stewart French
1998-02-05 0:00 ` Gautier
0 siblings, 1 reply; 60+ messages in thread
From: Stewart French @ 1998-02-04 0:00 UTC (permalink / raw)
Hello all,
I have about 30,000 lines of Ada code for a DSP that I'd like to convert
to C.
I've done a bunch of net searches without luck. Do any of you know of
any
Ada to C code translators? Companies? Web pages? etc.
Thanks aBunch,
Stewart French
french@ti.com
PS. Please email me directly.
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: Ada to C translator ?
1998-02-04 0:00 Ada to C translator ? Stewart French
@ 1998-02-05 0:00 ` Gautier
0 siblings, 0 replies; 60+ messages in thread
From: Gautier @ 1998-02-05 0:00 UTC (permalink / raw)
>I have about 30,000 lines of Ada code for a DSP that I'd like to convert
>to C.
>I've done a bunch of net searches without luck. Do any of you know of
>any
>Ada to C code translators? Companies? Web pages? etc.
Problem is that it is rather a compilation than a translation...
On complexity/feature scale you have
ASM...C...................Ada
The best to do is to keep the source in Ada!
The GNAT compiler produces an ASM code that you can retreive.
--
Gautier
^ permalink raw reply [flat|nested] 60+ messages in thread
* Ada to C translator ?
@ 1994-11-16 13:10 Eric Labbe
0 siblings, 0 replies; 60+ messages in thread
From: Eric Labbe @ 1994-11-16 13:10 UTC (permalink / raw)
We are currently in the process of translating a huge
application ( > 100000 lines) from Ada to C. We desesperatly
seek ways to accelerate the work.
Is there any tools that is able to perform a decent
job in translating from Ada to C? By decent, I mean something
that can understand the semantic of the Ada code before trying
to translate (not a tool that blindly replace the Ada code by
C synthax, we already have such a tool, and it does not help).
Thanks for any help.
Please reply by e-mail to: ericl@cae.ca
--
=======================
Eric Labbe SysOp of Amiga-Zone (514) 482-1339
Internet:ericl@cae.ca Montreal, Qc. (Canada)
Computer-Analyst (B.Sc) I like Denise, Agnus, Paula, Lisa & Alice
^ permalink raw reply [flat|nested] 60+ messages in thread
end of thread, other threads:[~2001-02-25 15:21 UTC | newest]
Thread overview: 60+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-21 15:44 Ada to C++ translator? gautier
-- strict thread matches above, loose matches on Subject: below --
2001-02-22 10:40 gautier
2001-02-22 9:24 gautier
2001-02-22 10:21 ` Martin Dowie
2001-02-09 19:17 Robert Brantley
2001-02-09 20:48 ` Britt Snodgrass
2001-02-09 23:35 ` Jeffrey Carter
2001-02-09 23:47 ` Brian Rogoff
2001-02-12 15:07 ` Ted Dennison
2001-02-12 15:49 ` Brian Rogoff
2001-02-13 19:36 ` Ted Dennison
2001-02-12 20:25 ` David C. Hoos, Sr.
2001-02-11 10:36 ` Gautier
2001-02-11 11:15 ` Pascal Obry
2001-02-11 11:15 ` Jean-Pierre Rosen
2001-02-12 10:36 ` David C. Hoos, Sr.
2001-02-11 13:15 ` Larry Kilgallen
2001-02-11 14:50 ` Ken Garlington
2001-02-11 15:58 ` Florian Weimer
2001-02-11 17:05 ` Aaro Koskinen
2001-02-15 23:47 ` Robert Brantley
2001-02-16 15:20 ` Ted Dennison
[not found] ` <cyik6.1725$DE.61421700@newssvr10-int.news.prodigy.com>
[not found] ` <%Wvk6.102$aw5.380@www.newsranger.com>
2001-02-21 0:33 ` Ken Garlington
2001-02-21 10:54 ` Ole-Hjalmar Kristensen
2001-02-21 12:40 ` Ken Garlington
2001-02-21 12:56 ` Ole-Hjalmar Kristensen
2001-02-21 18:36 ` Brian Rogoff
2001-02-21 19:05 ` Marin David Condic
2001-02-21 21:26 ` Simon Wright
2001-02-23 21:05 ` Marin David Condic
2001-02-24 8:38 ` Simon Wright
2001-02-24 16:22 ` Nick Williams
2001-02-24 19:22 ` Marin David Condic
2001-02-24 19:38 ` Ken Garlington
2001-02-25 15:21 ` Marin David Condic
2001-02-12 15:33 ` Ted Dennison
2001-02-15 23:37 ` Robert Brantley
2001-02-16 0:34 ` tmoran
2001-02-16 4:59 ` Lao Xiao Hai
2001-02-16 15:20 ` Marin David Condic
2001-02-16 11:02 ` Tarjei T. Jensen
2001-02-16 13:34 ` Ken Garlington
2001-02-16 14:55 ` Marin David Condic
2001-02-16 21:04 ` tmoran
2001-02-16 15:44 ` Ted Dennison
2001-02-21 13:21 ` Bob Jacobs
2001-02-21 14:14 ` Ted Dennison
2001-02-21 14:59 ` Bob Jacobs
2001-02-21 15:58 ` Martin Dowie
2001-02-21 16:15 ` Bob Jacobs
2001-02-21 16:57 ` Ted Dennison
2001-02-22 1:39 ` Andrew Berg
2001-02-22 9:09 ` Martin Dowie
2001-02-22 13:32 ` Bob Jacobs
2001-02-22 14:30 ` Ted Dennison
2001-02-22 9:17 ` Martin Dowie
2001-02-15 23:09 ` Robert Brantley
1998-02-04 0:00 Ada to C translator ? Stewart French
1998-02-05 0:00 ` Gautier
1994-11-16 13:10 Eric Labbe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox