comp.lang.ada
 help / color / mirror / Atom feed
* Runtime check : what about you ?
@ 2011-06-17  9:42 Yannick Duchêne (Hibou57)
  2011-06-17  9:56 ` Niklas Holsti
                   ` (8 more replies)
  0 siblings, 9 replies; 23+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2011-06-17  9:42 UTC (permalink / raw)



Hello,

Just out of curiosity as much as because this may be worth to discuss it  
to some (at least because there are some reflex with that) : how many of  
your typically compile releases with runtime check and how many of you  
typically compile releases without runtime check ?

I have some things I use to read in some forum in mind, but won't tell  
this.

Feel free to add any specific context information with your reply ;) (I  
guess most of you will feel the need)

Note: the question targets a wide audience, so please forgive if the  
question seems so much obvious to some of you.


-- 
“Syntactic sugar causes cancer of the semi-colons.”  [Epigrams on  
Programming — Alan J. — P. Yale University]
“Structured Programming supports the law of the excluded muddle.” [Idem]
Java: Write once, Never revisit



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

* Re: Runtime check : what about you ?
  2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
@ 2011-06-17  9:56 ` Niklas Holsti
  2011-06-17 10:06 ` Martin
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 23+ messages in thread
From: Niklas Holsti @ 2011-06-17  9:56 UTC (permalink / raw)


Yannick Duchêne (Hibou57) wrote:
> 
> Hello,
> 
> Just out of curiosity as much as because this may be worth to discuss it 
> to some (at least because there are some reflex with that) : how many of 
> your typically compile releases with runtime check and how many of you 
> typically compile releases without runtime check ?

I release with runtime checks (-gnato -fstack-check, although I must 
sometimes omit the latter due to compile-time problems). This is a 
non-interactive, non-embedded, non-real-time application for PCs.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .



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

* Re: Runtime check : what about you ?
  2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
  2011-06-17  9:56 ` Niklas Holsti
@ 2011-06-17 10:06 ` Martin
  2011-06-17 10:43 ` Simon Wright
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 23+ messages in thread
From: Martin @ 2011-06-17 10:06 UTC (permalink / raw)


On Jun 17, 10:42 am, Yannick Duchêne (Hibou57)
<yannick_duch...@yahoo.fr> wrote:
> Hello,
>
> Just out of curiosity as much as because this may be worth to discuss it  
> to some (at least because there are some reflex with that) : how many of  
> your typically compile releases with runtime check and how many of you  
> typically compile releases without runtime check ?
>
> I have some things I use to read in some forum in mind, but won't tell  
> this.
>
> Feel free to add any specific context information with your reply ;) (I  
> guess most of you will feel the need)
>
> Note: the question targets a wide audience, so please forgive if the  
> question seems so much obvious to some of you.
>
> --
> “Syntactic sugar causes cancer of the semi-colons.”  [Epigrams on  
> Programming — Alan J. — P. Yale University]
> “Structured Programming supports the law of the excluded muddle.” [Idem]
> Java: Write once, Never revisit

With checks on since 1995 - the real difference (for me) was the move
from 68000's to PowerPC - the processor was fast enough to allow them
to be kept.

<cavaet>
Unless the safety of the system required no runtime exceptions, of
course!
</cavaet>

-- Martin



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

* Re: Runtime check : what about you ?
  2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
  2011-06-17  9:56 ` Niklas Holsti
  2011-06-17 10:06 ` Martin
@ 2011-06-17 10:43 ` Simon Wright
  2011-06-17 11:35 ` J-P. Rosen
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 23+ messages in thread
From: Simon Wright @ 2011-06-17 10:43 UTC (permalink / raw)


"Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr> writes:

> Just out of curiosity as much as because this may be worth to discuss
> it to some (at least because there are some reflex with that) : how
> many of  your typically compile releases with runtime check and how
> many of you  typically compile releases without runtime check ?

The mission-critical system I used to work on was released with run-time
checks enabled. We would have used stack checking, but there was a
problem with the old GNAT release we were working with (I forget now
exactly what).

It was considered better to halt one of the redundant systems, and fail
over to the other, rather than proceed with the system in an unexpected
and probably unstable state.



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

* Re: Runtime check : what about you ?
  2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
                   ` (2 preceding siblings ...)
  2011-06-17 10:43 ` Simon Wright
@ 2011-06-17 11:35 ` J-P. Rosen
  2011-06-17 16:06 ` björn lundin
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 23+ messages in thread
From: J-P. Rosen @ 2011-06-17 11:35 UTC (permalink / raw)


Le 17/06/2011 11:42, Yannick Duchêne (Hibou57) a écrit :
> 
> Hello,
> 
> Just out of curiosity as much as because this may be worth to discuss it
> to some (at least because there are some reflex with that) : how many of
> your typically compile releases with runtime check and how many of you
> typically compile releases without runtime check ?
> 

AdaControl is always released with all checks on - and a number of
internal additional checks.

-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Adalog a déménagé / Adalog has moved:
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00



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

* Re: Runtime check : what about you ?
  2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
                   ` (3 preceding siblings ...)
  2011-06-17 11:35 ` J-P. Rosen
@ 2011-06-17 16:06 ` björn lundin
  2011-06-17 19:18   ` Robert A Duff
  2011-06-17 17:53 ` Jeffrey Carter
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 23+ messages in thread
From: björn lundin @ 2011-06-17 16:06 UTC (permalink / raw)


On 17 Juni, 11:42, Yannick Duchêne (Hibou57)
<yannick_duch...@yahoo.fr> wrote:
> Hello,
>
> Just out of curiosity as much as because this may be worth to discuss it  
> to some (at least because there are some reflex with that) : how many of  
> your typically compile releases with runtime check and how many of you  
> typically compile releases without runtime checks

On all systems and platforms - Windows/aix
We use gnato and fstack-check
On some systems we went from -O0 to -O2
Disaster on both platforms. We also use -g
This is with gnat pro.
The trouble with -O2 is probably fixed, this was
several years ago.

Warehouse management/control system.
The penalty is overweighed by
Ease of find reasons for crashes
(if we get them)
--
Björn



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

* Re: Runtime check : what about you ?
  2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
                   ` (4 preceding siblings ...)
  2011-06-17 16:06 ` björn lundin
@ 2011-06-17 17:53 ` Jeffrey Carter
  2011-06-17 18:59   ` Adam Beneschan
  2011-06-17 20:12   ` Vinzent Hoefler
  2011-06-17 20:12 ` Vinzent Hoefler
                   ` (2 subsequent siblings)
  8 siblings, 2 replies; 23+ messages in thread
From: Jeffrey Carter @ 2011-06-17 17:53 UTC (permalink / raw)


On 06/17/2011 02:42 AM, Yannick Duchêne (Hibou57) wrote:
>
> Just out of curiosity as much as because this may be worth to discuss it to some
> (at least because there are some reflex with that) : how many of your typically
> compile releases with runtime check and how many of you typically compile
> releases without runtime check ?

The description of the language in the ARM includes run-time checks. If checks 
are turned off, then you're using some other language, not Ada.

We always have checks on for our soft-real-time application.

-- 
Jeff Carter
"My mind is a raging torrent, flooded with rivulets of
thought, cascading into a waterfall of creative alternatives."
Blazing Saddles
89



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

* Re: Runtime check : what about you ?
  2011-06-17 17:53 ` Jeffrey Carter
@ 2011-06-17 18:59   ` Adam Beneschan
  2011-06-17 20:30     ` björn lundin
                       ` (5 more replies)
  2011-06-17 20:12   ` Vinzent Hoefler
  1 sibling, 6 replies; 23+ messages in thread
From: Adam Beneschan @ 2011-06-17 18:59 UTC (permalink / raw)


On Jun 17, 10:53 am, Jeffrey Carter
<spam.jrcarter....@spam.not.acm.org> wrote:
> On 06/17/2011 02:42 AM, Yannick Duchêne (Hibou57) wrote:
>
>
>
> > Just out of curiosity as much as because this may be worth to discuss it to some
> > (at least because there are some reflex with that) : how many of your typically
> > compile releases with runtime check and how many of you typically compile
> > releases without runtime check ?
>
> The description of the language in the ARM includes run-time checks. If checks
> are turned off, then you're using some other language, not Ada.

Then I guess the RM sections on the Suppress pragma must be a big fat
misprint.  Obviously, they're rogue pages that sneaked into the RM
from the standard for some other language.

Really, I don't see the point of statements like that.  Ada is a tool,
to be used for practical purposes.  It's not a religion.  And it was
certainly part of the intent of Ada's designers that developers would
develop their programs with checking turned on but then turn it off
after the program has been tested and is ready to be put into
production.  It's interesting to me that no one here has admitted
doing this; I don't know what this means, except that perhaps they're
only developing programs for which the computation time is small to
the amount of time spent waiting for the user to figure out where to
move the cursor, or something.  Or that no one is developing programs
that require a long intensive algorithm on a large 2-D array or
something like that, for which turning off checking could easily make
a huge difference.

                                -- Adam




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

* Re: Runtime check : what about you ?
  2011-06-17 16:06 ` björn lundin
@ 2011-06-17 19:18   ` Robert A Duff
  2011-06-17 20:13     ` björn lundin
  2011-06-17 20:34     ` Simon Wright
  0 siblings, 2 replies; 23+ messages in thread
From: Robert A Duff @ 2011-06-17 19:18 UTC (permalink / raw)


bj�rn lundin <b.f.lundin@gmail.com> writes:

> We use gnato and fstack-check

What about -gnata?

- Bob



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

* Re: Runtime check : what about you ?
  2011-06-17 17:53 ` Jeffrey Carter
  2011-06-17 18:59   ` Adam Beneschan
@ 2011-06-17 20:12   ` Vinzent Hoefler
  1 sibling, 0 replies; 23+ messages in thread
From: Vinzent Hoefler @ 2011-06-17 20:12 UTC (permalink / raw)


Jeffrey Carter wrote:

> The description of the language in the ARM includes run-time checks. If checks
> are turned off, then you're using some other language, not Ada.

Well, as long as the program is correct, the difference should be hard to tell. :)


Vinzent.

-- 
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.



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

* Re: Runtime check : what about you ?
  2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
                   ` (5 preceding siblings ...)
  2011-06-17 17:53 ` Jeffrey Carter
@ 2011-06-17 20:12 ` Vinzent Hoefler
  2011-06-18  0:15 ` Randy Brukardt
  2011-06-18  6:56 ` Dmitry A. Kazakov
  8 siblings, 0 replies; 23+ messages in thread
From: Vinzent Hoefler @ 2011-06-17 20:12 UTC (permalink / raw)


Yannick Duchêne (Hibou57) wrote:

> Just out of curiosity as much as because this may be worth to discuss it
> to some (at least because there are some reflex with that) : how many of
> your typically compile releases with runtime check and how many of you
> typically compile releases without runtime check ?

Checks on. At 100%.


Vinzent.

-- 
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.



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

* Re: Runtime check : what about you ?
  2011-06-17 19:18   ` Robert A Duff
@ 2011-06-17 20:13     ` björn lundin
  2011-06-17 20:34     ` Simon Wright
  1 sibling, 0 replies; 23+ messages in thread
From: björn lundin @ 2011-06-17 20:13 UTC (permalink / raw)


On 17 Juni, 21:18, Robert A Duff <bobd...@shell01.TheWorld.com> wrote:
> bj rn lundin <b.f.lun...@gmail.com> writes:
> > We use gnato and fstack-check
>
> What about -gnata?

That too. Like this. From a test implementation on Linux with
gpl_2010.
Seems I was wrong about fstack-check; I meant -funwind-tables.
But I think fstack-check was used before...

gcc -c -I./ -g -gnatwlaK -gnatvoU -gnat05 -O0 -funwind-tables -gnatwW -
gnatwR -I- -o /home/bnl/programming/svn_base/cl/std/sattmate/target/
adalib/global/stingray/wcs_process_log.o /home/bnl/programming/
svn_base/cl/std/sattmate/source/stingray/local/wcs_process/
wcs_process_log.adb

GNAT GPL 2010 (20100603)
Copyright 1992-2010, Free Software Foundation, Inc.

Compiling: /home/bnl/programming/svn_base/cl/std/sattmate/source/
stingray/local/wcs_process/wcs_process_log.adb (source file time
stamp: 2011-06-17 19:50:47)
 52 lines: No errors
gnatbind -E -x /home/bnl/programming/svn_base/cl/std/sattmate/target/
adalib/global/stingray/wcs_process.ali
gnatlink /home/bnl/programming/svn_base/cl/std/sattmate/target/adalib/
global/stingray/wcs_process.ali -g /home/bnl/programming/svn_base/cl/
std/sattmate/source/kernel/utility/global/sattmate.a -L /usr/lib -lpq





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

* Re: Runtime check : what about you ?
  2011-06-17 18:59   ` Adam Beneschan
@ 2011-06-17 20:30     ` björn lundin
  2011-06-18  0:19     ` Randy Brukardt
                       ` (4 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: björn lundin @ 2011-06-17 20:30 UTC (permalink / raw)




 >It's interesting to me that no one here has admitted
> doing this; I don't know what this means, except that perhaps they're
> only developing programs for which the computation time is small to
> the amount of time spent waiting for the user to figure out where to
> move the cursor, or something.  Or that no one is developing programs
> that require a long intensive algorithm on a large 2-D array or
> something like that, for which turning off checking could easily make
> a huge difference.
>
>                                 -- Adam

In my case, we are spending most of the time on either database io or
communication io.
--
björn







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

* Re: Runtime check : what about you ?
  2011-06-17 19:18   ` Robert A Duff
  2011-06-17 20:13     ` björn lundin
@ 2011-06-17 20:34     ` Simon Wright
  1 sibling, 0 replies; 23+ messages in thread
From: Simon Wright @ 2011-06-17 20:34 UTC (permalink / raw)


Robert A Duff <bobduff@shell01.TheWorld.com> writes:

> björn lundin <b.f.lundin@gmail.com> writes:
>
>> We use gnato and fstack-check
>
> What about -gnata?

-gnatqQafoy -gnatwaL -O2



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

* Re: Runtime check : what about you ?
  2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
                   ` (6 preceding siblings ...)
  2011-06-17 20:12 ` Vinzent Hoefler
@ 2011-06-18  0:15 ` Randy Brukardt
  2011-06-18  0:29   ` Robert A Duff
  2011-06-18  6:56 ` Dmitry A. Kazakov
  8 siblings, 1 reply; 23+ messages in thread
From: Randy Brukardt @ 2011-06-18  0:15 UTC (permalink / raw)


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

"Yannick Duch�ne (Hibou57)" <yannick_duchene@yahoo.fr> wrote in message 
news:op.vw7rxjtgule2fv@douda-yannick...

>Just out of curiosity as much as because this may be worth to discuss it 
>to some (at least because there are some reflex with that) : how many of 
>your typically compile releases with runtime check and how many of you 
>typically compile releases without runtime check ?

Janus/Ada is released with checking off. That was because the compiler with 
checking on was too large for typical machines back in the day, and there 
are various reasons that it is best to keep this the same going forward. 
OTOH, all of the beta releases of Janus/Ada are with checking all.

All of RRS's other programs and my other programs are released/used with 
checking on. Modern Ada compilers do a very good job of removing extra 
checks, and it is very rare that I have seen a case where it is worth the 
effort to suppress them. For things like the AdaIC search engine, it's many 
times better to have the protection of the checks in case there is some bug 
(out-of-range, null pointer deref, etc.) in the code -- with checking on, 
such bugs have no effect than causing a denial-of-service to the caller; 
with checking off, who knows what could happen?

I personally believe in the seatbelt analogy: "turning off checks in 
released software is like using seatbelts in the driveway and then taking 
them off when you reach the highway". For me, this also applies to 
assertions and contracts as well -- I only turn these things off if they are 
tremendously expensive (in which case I usually remove them permanently). I 
know there are others (like Bob Duff) who think this analogy is silly.

                                           Randy.





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

* Re: Runtime check : what about you ?
  2011-06-17 18:59   ` Adam Beneschan
  2011-06-17 20:30     ` björn lundin
@ 2011-06-18  0:19     ` Randy Brukardt
  2011-06-18  0:26     ` Randy Brukardt
                       ` (3 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Randy Brukardt @ 2011-06-18  0:19 UTC (permalink / raw)


"Adam Beneschan" <adam@irvine.com> wrote in message 
news:e0ac441f-db3e-4874-95ce-393524deef79@l2g2000prg.googlegroups.com...
...
> Really, I don't see the point of statements like that.  Ada is a tool,
> to be used for practical purposes.  It's not a religion.

Speak for yourself. ;-)

I used to joke that the reason I was single is that I was married to Lady 
Ada. I now fear that that is effectively true...

Ada is not quite a religion, but it's the next best thing! :-)

                         Randy.







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

* Re: Runtime check : what about you ?
  2011-06-17 18:59   ` Adam Beneschan
  2011-06-17 20:30     ` björn lundin
  2011-06-18  0:19     ` Randy Brukardt
@ 2011-06-18  0:26     ` Randy Brukardt
  2011-06-18  3:08     ` tmoran
                       ` (2 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Randy Brukardt @ 2011-06-18  0:26 UTC (permalink / raw)


"Adam Beneschan" <adam@irvine.com> wrote in message 
news:e0ac441f-db3e-4874-95ce-393524deef79@l2g2000prg.googlegroups.com...
...
>And it was
>certainly part of the intent of Ada's designers that developers would
>develop their programs with checking turned on but then turn it off
>after the program has been tested and is ready to be put into
>production.  It's interesting to me that no one here has admitted
>doing this;

I've done it, but not much recently. Even computationally intensive programs 
like my Solitare solver only needed it in a couple of very limited 
locations. And in the most recent such cases, I restructured the code (and 
admittedly, made the compiler smarter) so that the checks aren't generated 
in the first place -- which is of course the best of both worlds -- fast 
code which the compiler has proved to have no check failures.

                                    Randy.


 





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

* Re: Runtime check : what about you ?
  2011-06-18  0:15 ` Randy Brukardt
@ 2011-06-18  0:29   ` Robert A Duff
  2011-06-18  8:03     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 23+ messages in thread
From: Robert A Duff @ 2011-06-18  0:29 UTC (permalink / raw)


"Randy Brukardt" <randy@rrsoftware.com> writes:

> I personally believe in the seatbelt analogy: "turning off checks in 
> released software is like using seatbelts in the driveway and then taking 
> them off when you reach the highway". For me, this also applies to 
> assertions and contracts as well -- I only turn these things off if they are 
> tremendously expensive (in which case I usually remove them permanently). I 
> know there are others (like Bob Duff) who think this analogy is silly.

No, I don't think it's silly.  I think it applies in some cases,
but not others.  I think turning checks on or off is a difficult
engineering decision that should depend on various factors.

- Bob



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

* Re: Runtime check : what about you ?
  2011-06-17 18:59   ` Adam Beneschan
                       ` (2 preceding siblings ...)
  2011-06-18  0:26     ` Randy Brukardt
@ 2011-06-18  3:08     ` tmoran
  2011-06-18  7:16     ` J-P. Rosen
  2011-06-18  8:04     ` Niklas Holsti
  5 siblings, 0 replies; 23+ messages in thread
From: tmoran @ 2011-06-18  3:08 UTC (permalink / raw)


> that require a long intensive algorithm on a large 2-D array or
> something like that, for which turning off checking could easily make
> a huge difference.
    I've never in real life seen a difference that could be called "huge".
Although I grant that for some things, like a 2-D FFT on many images, I
call an optimized asm library routine (which has no checks).

    My current code runs a small PEG TV station, where nobody dies if the
time-and-temperature slide misses an update cycle, or a DVD is unreadable,
etc.  All Ada checks are on, and the handler logs, sends an email, or
sends a text message if there's a Minor ..  Significant unforeseen
problem.



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

* Re: Runtime check : what about you ?
  2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
                   ` (7 preceding siblings ...)
  2011-06-18  0:15 ` Randy Brukardt
@ 2011-06-18  6:56 ` Dmitry A. Kazakov
  8 siblings, 0 replies; 23+ messages in thread
From: Dmitry A. Kazakov @ 2011-06-18  6:56 UTC (permalink / raw)


On Fri, 17 Jun 2011 11:42:45 +0200, Yannick Duch�ne (Hibou57) wrote:

> Just out of curiosity as much as because this may be worth to discuss it  
> to some (at least because there are some reflex with that) : how many of  
> your typically compile releases with runtime check and how many of you  
> typically compile releases without runtime check ?

We leave most checks on (stack, integer overflow) in the release versions.
   
> Feel free to add any specific context information with your reply ;) (I  
> guess most of you will feel the need)

The platforms are VxWorks and Windows, used for distributed automation and
control systems (many sensors, actuators, protocols etc).

When performance question arise, which happens due to very tight
requirements on the latencies we have, we are trying optimize the software,
so that the compiler would remove unnecessary checks.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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

* Re: Runtime check : what about you ?
  2011-06-17 18:59   ` Adam Beneschan
                       ` (3 preceding siblings ...)
  2011-06-18  3:08     ` tmoran
@ 2011-06-18  7:16     ` J-P. Rosen
  2011-06-18  8:04     ` Niklas Holsti
  5 siblings, 0 replies; 23+ messages in thread
From: J-P. Rosen @ 2011-06-18  7:16 UTC (permalink / raw)


Le 17/06/2011 20:59, Adam Beneschan a �crit :
Others have already said what I wanted to say...

An addition:
> And it was
> certainly part of the intent of Ada's designers that developers would
> develop their programs with checking turned on but then turn it off
> after the program has been tested and is ready to be put into
> production.
Definitely not. Don't forget that a pragma, including pragma suppress,
can be put in very limited scopes.

The intent is that IF you have identified the innermost loop that eats
up 90% of the computing time, and IF you have determined by careful
measurement that a significant part of it is taken by checks, and IF
your program cannot meet otherwise the performances from its
requirements, THEN you can include this loop into a block statement to
which a pragma suppress applies.


-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Adalog a d�m�nag� / Adalog has moved:
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00



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

* Re: Runtime check : what about you ?
  2011-06-18  0:29   ` Robert A Duff
@ 2011-06-18  8:03     ` Dmitry A. Kazakov
  0 siblings, 0 replies; 23+ messages in thread
From: Dmitry A. Kazakov @ 2011-06-18  8:03 UTC (permalink / raw)


On Fri, 17 Jun 2011 20:29:29 -0400, Robert A Duff wrote:

> "Randy Brukardt" <randy@rrsoftware.com> writes:
> 
>> I personally believe in the seatbelt analogy: "turning off checks in 
>> released software is like using seatbelts in the driveway and then taking 
>> them off when you reach the highway". For me, this also applies to 
>> assertions and contracts as well -- I only turn these things off if they are 
>> tremendously expensive (in which case I usually remove them permanently). I 
>> know there are others (like Bob Duff) who think this analogy is silly.
> 
> No, I don't think it's silly.  I think it applies in some cases,
> but not others.  I think turning checks on or off is a difficult
> engineering decision that should depend on various factors.

I think it is rather simply. Redundant checks are removed, all others stay.
It is exactly same as removing an "if" statement. If you know that the
condition is trivially false, you do. If you don't know it, you don't.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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

* Re: Runtime check : what about you ?
  2011-06-17 18:59   ` Adam Beneschan
                       ` (4 preceding siblings ...)
  2011-06-18  7:16     ` J-P. Rosen
@ 2011-06-18  8:04     ` Niklas Holsti
  5 siblings, 0 replies; 23+ messages in thread
From: Niklas Holsti @ 2011-06-18  8:04 UTC (permalink / raw)


Adam Beneschan wrote:
> On Jun 17, 10:53 am, Jeffrey Carter
> <spam.jrcarter....@spam.not.acm.org> wrote:
>> On 06/17/2011 02:42 AM, Yannick Duch�ne (Hibou57) wrote:
>>
>>
>>
>>> Just out of curiosity as much as because this may be worth to discuss it to some
>>> (at least because there are some reflex with that) : how many of your typically
>>> compile releases with runtime check and how many of you typically compile
>>> releases without runtime check ?
>> The description of the language in the ARM includes run-time checks. If checks
>> are turned off, then you're using some other language, not Ada.
> 
> Then I guess the RM sections on the Suppress pragma must be a big fat
> misprint.  Obviously, they're rogue pages that sneaked into the RM
> from the standard for some other language.
> 
> Really, I don't see the point of statements like that.  Ada is a tool,
> to be used for practical purposes.  It's not a religion.  And it was
> certainly part of the intent of Ada's designers that developers would
> develop their programs with checking turned on but then turn it off
> after the program has been tested and is ready to be put into
> production.  It's interesting to me that no one here has admitted
> doing this;

We effectively did that in my preceding Ada project (the platform 
on-board SW for the GOCE satellite) where we tested on a workstation 
using native compilation with checks on, but released cross-compiled 
target code with checks off. The target compiler does not support 
standard exception handling so we did not even have to think about 
whether and how we could have handled check failures on the target. (We 
did of course run the tests on the target, too, not just on the 
workstation.)

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .



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

end of thread, other threads:[~2011-06-18  8:04 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
2011-06-17  9:56 ` Niklas Holsti
2011-06-17 10:06 ` Martin
2011-06-17 10:43 ` Simon Wright
2011-06-17 11:35 ` J-P. Rosen
2011-06-17 16:06 ` björn lundin
2011-06-17 19:18   ` Robert A Duff
2011-06-17 20:13     ` björn lundin
2011-06-17 20:34     ` Simon Wright
2011-06-17 17:53 ` Jeffrey Carter
2011-06-17 18:59   ` Adam Beneschan
2011-06-17 20:30     ` björn lundin
2011-06-18  0:19     ` Randy Brukardt
2011-06-18  0:26     ` Randy Brukardt
2011-06-18  3:08     ` tmoran
2011-06-18  7:16     ` J-P. Rosen
2011-06-18  8:04     ` Niklas Holsti
2011-06-17 20:12   ` Vinzent Hoefler
2011-06-17 20:12 ` Vinzent Hoefler
2011-06-18  0:15 ` Randy Brukardt
2011-06-18  0:29   ` Robert A Duff
2011-06-18  8:03     ` Dmitry A. Kazakov
2011-06-18  6:56 ` Dmitry A. Kazakov

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