Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: Is it possi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 12 Topic 5825 of 5857
Post > Topic >>

Re: Is it possible to translate ada program to C using GCC or other

by anon@[EMAIL PROTECTED] (anon) Jul 23, 2008 at 07:01 AM

First to clarify, the compiling process. Normally to compile a program

        step 1. gnat compile <filename>.adb

        step 2. gnat bind <filename>.ali   or  gnatbind <filename>.ali
             this program creates two files:
                   1. b~<filename>.adb  
                   2. b~<filename>.ads

        step 3. gnat link <filename>.ali or gnatlink <filename>.ali
             this program compiles the package
                   b~<filename>.adb  
             and then finishes the linking process.
             Note: After linking the b~<filename>.* files are deleted.


but in step two and three you can use

        step 2. gnat bind -C <filename>.ali   or gnatbind -C
<filename>.ali
             this creates one file:
                   1. b_<filename>.c
             this file is equivalence to the package file:
                   b~<filename>.adb  

        step 3. gnat link -C <filename>.ali or gnatlink -C <filename>.ali
             this program compiles the C binder file 
                   b_<filename>.c  
             and then finishes the linking process.
             Note: After linking the b_<filename>.* files are deleted.


As for the thesis, I am not sure, you might be able to find it. There is 
a "Jeffrey Skinner" that is into web designing.  Maybe he is the same 
guy, so I would suggest, that you email and ask him.  The only problem I 
see will be that the Ada translator and source code will be based on Ada 
83 specs.


   www.jeffreyskinner.com
                  Jeffrey Skinner. email: jeff [at] jeffreyskinner
                                           aka
                                           jeff@[EMAIL PROTECTED]
 


In <822c5e24-bd20-458d-8346-ba22994aa850@[EMAIL PROTECTED]
>,
climber.cui@[EMAIL PROTECTED]
 writes:
>On Jul 22, 8:45 pm, a...@[EMAIL PROTECTED]
 (anon) wrote:
>> No!
>>
>> In GNAT the compiler generates assembly code. With one exception that
is
>> "GNATBIND" program. Using the "-C" option, GNATBIND with produce its
>> binder program in C. But that does very little for what most people
want.
>>
>> A thesis, back in 1991 by Jeffrey Skinner, was in titled "Ada2C: An
>> ADA-To-C Program Translator" but it seams that today, most "Ada2C"
>> programs have more to do with homework assignments than actual working
>> programs.
>>
>Any chance to get ADA to be translated to something readable, like ADA
>code plus run-time calls to its runtime system and pthread library?
>By the way, how to use GNAT to compile ada program into assembly code?
>I use gcc with -S option, but did not get anything but an assembly
>program with no body.
>
>tony
>
 




 12 Posts in Topic:
Is it possible to translate ada program to C using GCC or other
climber.cui@[EMAIL PROTEC  2008-07-22 13:48:10 
Re: Is it possible to translate ada program to C using GCC or ot
"Jeffrey R. Carter&q  2008-07-23 00:15:31 
Re: Is it possible to translate ada program to C using GCC or ot
anon@[EMAIL PROTECTED] (  2008-07-23 00:45:42 
Re: Is it possible to translate ada program to C using GCC or ot
climber.cui@[EMAIL PROTEC  2008-07-22 17:59:25 
Re: Is it possible to translate ada program to C using GCC or ot
climber.cui@[EMAIL PROTEC  2008-07-22 18:05:00 
Re: Is it possible to translate ada program to C using GCC or ot
anon@[EMAIL PROTECTED] (  2008-07-23 07:01:33 
Re: Is it possible to translate ada program to C using GCC or ot
Pascal Obry <pascal@[E  2008-07-23 12:12:22 
Re: Is it possible to translate ada program to C using GCC or ot
Robert A Duff <bobduff  2008-07-22 21:44:27 
Re: Is it possible to translate ada program to C using GCC or ot
"Steve" <nos  2008-07-22 19:23:12 
Re: Is it possible to translate ada program to C using GCC or ot
Peter Schildmann <news  2008-07-23 08:46:53 
Re: Is it possible to translate ada program to C using GCC or ot
"Steve" <nos  2008-07-23 18:32:13 
Re: Is it possible to translate ada program to C using GCC or ot
Georg Bauhaus <rm.tsoh  2008-07-23 09:54:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 20 4:17:39 CDT 2008.