Re: Contracted exceptions for Ada
- From: "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx>
- Date: Wed, 12 Dec 2007 11:20:32 +0100
On Tue, 11 Dec 2007 20:50:07 +0000, Simon Wright wrote:
"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> writes:
On Mon, 10 Dec 2007 20:25:34 +0000, Simon Wright wrote:
The Ariane IV system engineers said to themselves, and probably in
the design documentation, "The maximum horizontal velocity is
X. Therefore the conversion to the fixed-point type _Whatever_
cannot overflow. Therefore we do not need to handle exceptions for
this conversion, so (given we are short of CPU power) we will not
do any extra processing to avoid exceptions."
Not sure they would have recognised "contract" in that context.
Yes, my premise was that the type of H_Input changed from Ariane IV
to Ariane V. In this case translation of the conversion function
H_Input_To_Whatever could refute the second "therefore" because X
would not be the maximal possible value of H_Input anymore.
X was *never* the maximum possible value of H_Input!
In that case with contracted exceptions, the code without an exception
handler were illegal from the beginning.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.
- References:
- Exceptions
- From: shaunpatterson
- Re: Exceptions
- From: tmoran
- Re: Exceptions
- From: Dmitry A. Kazakov
- Re: Exceptions
- From: Randy Brukardt
- Contracted exceptions for Ada (was: Exceptions)
- From: Dmitry A. Kazakov
- Re: Contracted exceptions for Ada (was: Exceptions)
- From: Martin Krischik
- Re: Contracted exceptions for Ada
- From: Dmitry A. Kazakov
- Re: Contracted exceptions for Ada
- From: Simon Wright
- Re: Contracted exceptions for Ada
- From: Dmitry A. Kazakov
- Re: Contracted exceptions for Ada
- From: Simon Wright
- Re: Contracted exceptions for Ada
- From: Dmitry A. Kazakov
- Re: Contracted exceptions for Ada
- From: Simon Wright
- Exceptions
- Prev by Date: Re: Exceptions
- Next by Date: Re: Exceptions
- Previous by thread: Re: Contracted exceptions for Ada
- Next by thread: Re: Contracted exceptions for Ada
- Index(es):
Relevant Pages
|