comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: body stub not allowed in inner scope
Date: Thu, 1 Mar 2018 16:45:26 -0600
Date: 2018-03-01T16:45:26-06:00	[thread overview]
Message-ID: <p79vq7$l8a$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 87tvtzv7rg.fsf@jacob-sparre.dk

"Jacob Sparre Andersen" <jacob@jacob-sparre.dk> wrote in message 
news:87tvtzv7rg.fsf@jacob-sparre.dk...
> Simon Wright <simon@pushface.org> writes:
>> Randy Brukardt <randy@rrsoftware.com> writes:
>
>> My use case for stubs is that I have a code generator that transforms
>> a UML model into the framework of an Ada solution; subprograms, task
>> and protected type bodies are generated as separates, so that there's
>> no hassle with having the tool work out how not to overwrite the real
>> bodies. This was triggered by bad experiences with Rational Rose back
>> in 2000.
>
> This sounds rather similar to some work I've done for Consafe Logistics
> last year.  I wrote a code generator, which compiles Swagger/OAS
> specifications of REST interfaces into packages declaring the services
> and the types used.  The actual service implementations are made
> separate, to have the optimal separation of developer-written and
> tool-written Ada code.

The CLAW Builder generated code does this, but used user-generated packages 
for this purpose (rather than separates). The user provides the name of the 
package, and the generated code makes the needed calls. We were about to 
allow the user to choose to generate the package specifications for such 
packages (that never got implemented) so that the bodies would be easier to 
write (that would make the profiles of the needed routines obvious, rather 
than just being in the popup help for the builder). We never even considered 
subunits for this purpose (maybe should have? Dunno.) One never wants to mix 
machine-generated code (which the user should look at only in cases where 
there is a bug in the tools) with user-generated code (which the user 
obviously has to manage, and would prefer to use their normal IDE for 
development).

                                            Randy.



  reply	other threads:[~2018-03-01 22:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 13:01 body stub not allowed in inner scope Mehdi Saada
2018-02-28 13:32 ` AdaMagica
2018-02-28 14:30   ` Mehdi Saada
2018-02-28 14:39     ` AdaMagica
2018-02-28 23:23     ` Randy Brukardt
2018-03-01  7:14       ` J-P. Rosen
2018-03-01 22:38         ` Randy Brukardt
2018-03-02  7:14           ` J-P. Rosen
2018-03-02 10:17             ` Dmitry A. Kazakov
2018-03-02 22:10               ` Randy Brukardt
2018-03-03  3:38                 ` Dennis Lee Bieber
2018-03-02 22:13             ` Randy Brukardt
2018-03-02 19:37           ` G. B.
2018-03-02 19:47             ` Simon Wright
2018-03-03  9:42               ` G.B.
2018-03-01  8:20       ` Dmitry A. Kazakov
2018-03-01  8:24       ` Simon Wright
2018-03-01 20:52         ` Jacob Sparre Andersen
2018-03-01 22:45           ` Randy Brukardt [this message]
2018-03-01  8:38       ` Niklas Holsti
2018-03-01  9:11       ` Björn Lundin
2018-03-01 15:19       ` marciant
2018-03-01 17:37       ` Shark8
2018-02-28 15:26 ` Mehdi Saada
2018-02-28 15:28   ` Mehdi Saada
2018-02-28 23:32   ` Randy Brukardt
2018-03-01  0:16     ` Mehdi Saada
2018-02-28 17:24 ` Jeffrey R. Carter
2018-02-28 18:05   ` Simon Wright
2018-02-28 19:04     ` Jeffrey R. Carter
replies disabled

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