comp.lang.ada
 help / color / mirror / Atom feed
* Other implementations of pragma Abort_Defer?
@ 1998-01-22  0:00 Pat Rogers
  1998-01-23  0:00 ` Jean-Pierre Rosen
  0 siblings, 1 reply; 8+ messages in thread
From: Pat Rogers @ 1998-01-22  0:00 UTC (permalink / raw)



I'm curious how many other implementations have also provided something
similar to GNAT's pragma Abort_Defer.  Although I think the parts of the
name are backward (i.e. I would have thought it would be Defer_Abort, if not
Abort_Deferred) it is a much lighter mechanism than an otherwise unnecessary
protected type.  Any info??






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Other implementations of pragma Abort_Defer?
  1998-01-22  0:00 Other implementations of pragma Abort_Defer? Pat Rogers
@ 1998-01-23  0:00 ` Jean-Pierre Rosen
  1998-01-23  0:00   ` Robert Dewar
  1998-01-23  0:00   ` Pat Rogers
  0 siblings, 2 replies; 8+ messages in thread
From: Jean-Pierre Rosen @ 1998-01-23  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 732 bytes --]


Pat Rogers a �crit dans le message <6a91ej$e1n$1@uuneo.neosoft.com>...
>I'm curious how many other implementations have also provided something
>similar to GNAT's pragma Abort_Defer.  Although I think the parts of the
>name are backward (i.e. I would have thought it would be Defer_Abort, if
not
>Abort_Deferred) it is a much lighter mechanism than an otherwise
unnecessary
>protected type.  Any info??
>
You don't need a special pragma to defer abortion, it can be done in a 100%
portable way.
I have a package that allows you to protect a call to a procedure from
abortion. I plan to put it on Adalog's web site as soon as I find the time
to write the documentation... In the meantime, I can send it to anyone
interested.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Other implementations of pragma Abort_Defer?
  1998-01-23  0:00 ` Jean-Pierre Rosen
@ 1998-01-23  0:00   ` Robert Dewar
  1998-01-24  0:00     ` Jean-Pierre Rosen
  1998-01-23  0:00   ` Pat Rogers
  1 sibling, 1 reply; 8+ messages in thread
From: Robert Dewar @ 1998-01-23  0:00 UTC (permalink / raw)



JPR says

<<You don't need a special pragma to defer abortion, it can be done in a 100%
portable way.
I have a package that allows you to protect a call to a procedure from
abortion. I plan to put it on Adalog's web site as soon as I find the time
to write the documentation... In the meantime, I can send it to anyone
interested.
>>

Sure it can be done portably, but only with a heavy interface that is
likely to incur additional overhead. The mere fact that your package
requires documentation suggests its heaviness. We have found the pragma
extremely useful in many contexts.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Other implementations of pragma Abort_Defer?
  1998-01-23  0:00 ` Jean-Pierre Rosen
  1998-01-23  0:00   ` Robert Dewar
@ 1998-01-23  0:00   ` Pat Rogers
  1998-01-24  0:00     ` Jean-Pierre Rosen
  1 sibling, 1 reply; 8+ messages in thread
From: Pat Rogers @ 1998-01-23  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]



Jean-Pierre Rosen wrote in message <6aa95k$pou$1@peuplier.wanadoo.fr>...
>Pat Rogers a �crit dans le message <6a91ej$e1n$1@uuneo.neosoft.com>...
>>I'm curious how many other implementations have also provided something
>>similar to GNAT's pragma Abort_Defer.  Although I think the parts of the
>>name are backward (i.e. I would have thought it would be Defer_Abort, if
>not
>>Abort_Deferred) it is a much lighter mechanism than an otherwise
>unnecessary
>>protected type.  Any info??
>>
>You don't need a special pragma to defer abortion, it can be done in a 100%
>portable way.
>I have a package that allows you to protect a call to a procedure from
>abortion. I plan to put it on Adalog's web site as soon as I find the time
>to write the documentation... In the meantime, I can send it to anyone
>interested.


Indeed I would be interested -- but I hope it doesn't involve protected or
controlled types, as those are the only alternatives that come to mind, and
they are a bit heavy in this context (says he who has defended the
generic-instantiation-to-get-equality-for-nonlimited-types approach for
Ada83 :) ...






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Other implementations of pragma Abort_Defer?
  1998-01-23  0:00   ` Robert Dewar
@ 1998-01-24  0:00     ` Jean-Pierre Rosen
  0 siblings, 0 replies; 8+ messages in thread
From: Jean-Pierre Rosen @ 1998-01-24  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]


Robert Dewar a �crit dans le message ...
>JPR says
>
><<You don't need a special pragma to defer abortion, it can be done in a
100%
>portable way.
>I have a package that allows you to protect a call to a procedure from
>abortion. I plan to put it on Adalog's web site as soon as I find the time
>to write the documentation... In the meantime, I can send it to anyone
>interested.
>>>
>
>Sure it can be done portably, but only with a heavy interface that is
>likely to incur additional overhead. The mere fact that your package
>requires documentation suggests its heaviness.
The *interface* is extremely simple, but I have as a principle not to put
something on my web site unless I have some html file with it to explain
what it is about. The *implementation* certainly incurs some overhead (well,
it's a trade-off between efficiency and portability).

>We have found the pragma
>extremely useful in many contexts.
Oh, certainly, and especially for the implementation of finalization - I
guess. I just mentionned there was a portable solution. I did not mean it
was the best solution in every situation, but certainly in the case where
you want portable software components.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Other implementations of pragma Abort_Defer?
  1998-01-23  0:00   ` Pat Rogers
@ 1998-01-24  0:00     ` Jean-Pierre Rosen
  1998-01-25  0:00       ` Pat Rogers
  0 siblings, 1 reply; 8+ messages in thread
From: Jean-Pierre Rosen @ 1998-01-24  0:00 UTC (permalink / raw)



>>I have a package that allows you to protect a call to a procedure from
>>abortion. I plan to put it on Adalog's web site as soon as I find the time
>>to write the documentation... In the meantime, I can send it to anyone
>>interested.
>
>
>Indeed I would be interested -- but I hope it doesn't involve protected or
>controlled types, as those are the only alternatives that come to mind, and
>they are a bit heavy in this context (says he who has defended the
>generic-instantiation-to-get-equality-for-nonlimited-types approach for
>Ada83 :) ...
>
Aha, you want a hint... No protected types, but it does use finalization.
I'll send you the package in a separate mail.
(and BTW: of course, a protected type is the easiest way to protect from
abortion; my package is really useful only when the unabortable procedure
must perfom things (typically IOs) that are not allowed from a protected
operation).









^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Other implementations of pragma Abort_Defer?
  1998-01-24  0:00     ` Jean-Pierre Rosen
@ 1998-01-25  0:00       ` Pat Rogers
  1998-01-26  0:00         ` Nick Roberts
  0 siblings, 1 reply; 8+ messages in thread
From: Pat Rogers @ 1998-01-25  0:00 UTC (permalink / raw)



Jean-Pierre Rosen wrote in message <6ads7q$2pa$2@peuplier.wanadoo.fr>...
>>>I have a package that allows you to protect a call to a procedure from
>>>abortion. I plan to put it on Adalog's web site as soon as I find the
time
>>>to write the documentation... In the meantime, I can send it to anyone
>>>interested.

Using the GNAT-defined pragma, one says:

    procedure Unabortably_Do_This is
    begin
       pragma Abort_Defer;
       -- things to do with abort deferred....
    end Unabortably_Do_This;


It is a shame we can't just say:

    pragma Convention( Abort_Deferred, Unabortably_Do_This );


The real question I originally asked, though, is how many other vendors also
implement a pragma to do the same as Abort_Defer?  There has been some
cooperation on other aspects, is there any here?






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Other implementations of pragma Abort_Defer?
  1998-01-25  0:00       ` Pat Rogers
@ 1998-01-26  0:00         ` Nick Roberts
  0 siblings, 0 replies; 8+ messages in thread
From: Nick Roberts @ 1998-01-26  0:00 UTC (permalink / raw)



The problem of using such a pragma will generally be lack of portability
(unless, of course, all compiler providers agree to support it!).  The
other methods, mentioned earlier in this thread, of achieving the same
effect, although they are less concise, are portable.  I'm sure the package
mentioned in Jean-Pierre's post would be very interesting, and useful to
some.

I think this thread also raises a wider question: is there a mechanism
(formal or informal) in existence whereby compiler providers can agree
(even if it is only partially) upon the syntax and function of non-standard
pragmas and attributes?

-- 

Nick Roberts
Croydon, UK

Proprietor, ThoughtWing Software; Independent Software Development
Consultant
* Nick.Roberts@dial.pipex.com * Voicemail & Fax +44 181-405 1124 *
*** Always game for a verbal joust (usually as the turkey) ***


Pat Rogers <progers@acm.org> wrote in article
<6ag78c$86t$1@uuneo.neosoft.com>...
> Jean-Pierre Rosen wrote in message <6ads7q$2pa$2@peuplier.wanadoo.fr>...
> >>>I have a package that allows you to protect a call to a procedure from
> >>>abortion. I plan to put it on Adalog's web site as soon as I find the
> time
> >>>to write the documentation... In the meantime, I can send it to anyone
> >>>interested.
> 
> Using the GNAT-defined pragma, one says:
> 
>     procedure Unabortably_Do_This is
>     begin
>        pragma Abort_Defer;
>        -- things to do with abort deferred....
>     end Unabortably_Do_This;
> 
> 
> It is a shame we can't just say:
> 
>     pragma Convention( Abort_Deferred, Unabortably_Do_This );
> 
> 
> The real question I originally asked, though, is how many other vendors
also
> implement a pragma to do the same as Abort_Defer?  There has been some
> cooperation on other aspects, is there any here?





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1998-01-26  0:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-22  0:00 Other implementations of pragma Abort_Defer? Pat Rogers
1998-01-23  0:00 ` Jean-Pierre Rosen
1998-01-23  0:00   ` Robert Dewar
1998-01-24  0:00     ` Jean-Pierre Rosen
1998-01-23  0:00   ` Pat Rogers
1998-01-24  0:00     ` Jean-Pierre Rosen
1998-01-25  0:00       ` Pat Rogers
1998-01-26  0:00         ` Nick Roberts

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