comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: example of machine generated Ada ?
Date: Fri, 4 Oct 2013 21:49:15 -0500
Date: 2013-10-04T21:49:15-05:00	[thread overview]
Message-ID: <l2nunc$lj5$1@loke.gir.dk> (raw)
In-Reply-To: lyr4c2ud2k.fsf@pushface.org

"Simon Wright" <simon@pushface.org> wrote in message 
news:lyr4c2ud2k.fsf@pushface.org...
> Patrick <patrick@spellingbeewinnars.org> writes:
>
>> I am just daydreaming about generating Ada from another language.
>>
>> Several languages use C as an intermediate language but hand written C
>> is hard to read and machine generated is even more painful. Ada might
>> make for reliable, readable machine generated code.
>
> It depends on the aims of the person/organisation that develops the code
> generator. My aims in ColdFrame[1], which amongst other things generates
> package specs that users might need to look at, included that the
> generated code should look as if it had been written by a human - and
> should compile without warnings, especially style warnings. I see that I
> actually suppress style warnings, but as I recall this was only because
> users insisted on using very long names and in consequence I couldn't
> avoid long lines. Perhaps I should revisit this now that GNAT allows
> finer control? - no, it only allows you to switch particular style
> checks off for specific entities, the non-specific form only allows
> adding checks.
>
> [1] https://sourceforge.net/projects/coldframe/

The Claw GUI builder had similar goals for the generated code. It looks 
pretty similar to the code I would have written by hand (partially because 
that's how it came to be, I wrote the generator to write code similar to the 
known working examples). 
http://www.rrsoftware.com/html/prodinf/claw/claw.htm

OTOH, if you have an abstraction inversion (say, taking compiler 
intermediate code and turning it into Ada), you're probably not going to get 
very understandable Ada. So it obviously depends on the generator and the 
goals.

                              Randy.




  reply	other threads:[~2013-10-05  2:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02 17:37 example of machine generated Ada ? Patrick
2013-10-03  5:10 ` Robert Love
2013-10-03  6:14   ` Niklas Holsti
2013-10-05 15:46     ` Martin
2013-10-03  5:40 ` Simon Wright
2013-10-05  2:49   ` Randy Brukardt [this message]
2013-10-05  7:22     ` Simon Wright
2013-10-03  9:01 ` gautier_niouzes
2013-10-03 11:38 ` Marius Amado-Alves
2013-10-03 13:12 ` Patrick
2015-01-09 21:33 ` Paul Rubin
replies disabled

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