|
Prev: Ada Engineers available!
Next: tasksing and TCP sockets
From: zangnew on 24 Jan 2006 14:55 I am looking for an Ada to C++ translator. The converter will only be used as an intermediate step and not used on sections of code we will be re-architecting to make use of C++ functionality. Thanks You.
From: Jeffrey R. Carter on 24 Jan 2006 17:39 zangnew(a)gmail.com wrote: > I am looking for an Ada to C++ translator. The converter will only be > used as an intermediate step and not used on sections of code we will > be re-architecting to make use of C++ functionality. Such a beast is impossible, since there is no translation for tasks and protected objects. -- Jeff Carter "My mind is aglow with whirling, transient nodes of thought, careening through a cosmic vapor of invention." Blazing Saddles 85
From: Gautier Write-only on 24 Jan 2006 18:25 zangnew(a)gmail.com wrote: > I am looking for an Ada to C++ translator. The converter will only be > used as an intermediate step and not used on sections of code we will > be re-architecting to make use of C++ functionality. > > Thanks You. As Jeffrey pointed out, it is per se impossible. I can be possible that also basic Ada things like unconstrained array types cannot be translated without some OO overhead in C++. Any expert here ? It seems you are indeed looking for an Ada compiler producing C or C++ code (since you mention that the converter is an intermediate), and such tools exist. By googling a bit I found that one for instance: http://www.sofcheck.com/products/adamagic.html HTH _______________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/index.htm Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site!
From: David Emery on 24 Jan 2006 18:26 Jeffrey R. Carter wrote: > zangnew(a)gmail.com wrote: > >> I am looking for an Ada to C++ translator. The converter will only be >> used as an intermediate step and not used on sections of code we will >> be re-architecting to make use of C++ functionality. > > Such a beast is impossible, since there is no translation for tasks and > protected objects. > That's not true. There's no 1-1 translation, bu a POSIX-based runtime certainly can show how to translate Ada tasking to a sequence of C/POSIX primitives (Mutexes, Semaphores, etc). It's certainly non-trivial, but it can be done. A good recent paper on sequential Ada is: Audsen, Howard & Nyberg, "Using ASIS to Generate C++ Bindings", Proc SIGAda 2005 For tasking constructs, search for papers by Ted Baker and/or Ted Giering. If you're a SIGAda member, it's in the proceedings you got last month :-) dave
From: REH on 24 Jan 2006 20:15
"Gautier Write-only" <gautier(a)fakeaddress.nil> wrote in message news:43D6B75B.A006CC1A(a)fakeaddress.nil... > zangnew(a)gmail.com wrote: > As Jeffrey pointed out, it is per se impossible. I can be possible > that also basic Ada things like unconstrained array types cannot be > translated without some OO overhead in C++. Any expert here ? > A vector can easily fit that bill. |