comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Float conversion
Date: Wed, 4 Aug 2010 16:32:46 +0200
Date: 2010-08-04T16:32:45+02:00	[thread overview]
Message-ID: <1uuvx10ynvzyw.1g2rh2mpso9j.dlg@40tude.net> (raw)
In-Reply-To: wcctynay1yf.fsf@shell01.TheWorld.com

On Wed, 04 Aug 2010 08:52:40 -0400, Robert A Duff wrote:

> Stephen Leake <stephen_leake@stephe-leake.org> writes:
> 
>> It is easy! This is a very small program; exhaustive testing is
>> appropriate. 
> 
> I wouldn't call that "exhaustive".  To me, exhaustive testing means
> testing every possible input.

x every possible initial state

(some things are stateful. A pipelined CPU pipeline definitely is. We used
to ignore that, can we for "exhaustive" testing?) 

>> What are you verifying, if not a specification?
> 
> You can't formally verify specifications.  You can (sometimes) formally
> verify that the code matches a specification.

Right.

(although one could check a specification for being consistent, i.e.
allowing at least one implementation)
 
> Anyway, I didn't see any specification for "min" in this thread.
> We just assume we all know what it means.  But how do we know
> for sure that min(1.0, 1.0, 99.0) is not supposed to return
> 99.0?  "min" is a poor name for such a function, but what
> if it were something more complicated?

(I think min is OK to denote the lower bound of a subset that belongs to
the subset.)

> And what is "min" supposed to do with NaNs?

NaN? However the interval NaN is unbounded. -Inf does not have the lower
bound (no min). +Inf does not have the upper bound (no max).

--------------
I think that in any realistic case writing formal specifications and
verifying against them, would simpler than writing formal specifications
anyway, deriving specifications of a test set from them, showing that these
tests would detect any implementation error (exhaustive), implementing
these tests, verifying these test against their specifications and finally
running all these tests.

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



  reply	other threads:[~2010-08-04 14:32 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 12:23 Float conversion Henrique
2010-07-29 12:44 ` Jacob Sparre Andersen
2010-07-29 12:46 ` Dmitry A. Kazakov
2010-07-29 15:08   ` Georg Bauhaus
2010-07-29 15:10     ` Georg Bauhaus
2010-07-29 15:35     ` Dmitry A. Kazakov
2010-07-29 18:21       ` Henrique
2010-07-29 19:08         ` Jeffrey R. Carter
2010-07-29 19:15         ` Dmitry A. Kazakov
2010-07-30  1:30           ` Phil Clayton
2010-07-30  8:43             ` Dmitry A. Kazakov
2010-07-30 13:14               ` Phil Clayton
2010-07-30 14:34                 ` Dmitry A. Kazakov
2010-07-31 15:12                 ` Stephen Leake
2010-08-03  1:07                   ` Phil Clayton
2010-08-03  3:31                     ` Shark8
2010-08-03 10:38                     ` Georg Bauhaus
2010-08-04  7:27                       ` Stephen Leake
2010-08-04 16:15                         ` Georg Bauhaus
2010-08-04 16:32                       ` Phil Clayton
2010-08-04  7:26                     ` Stephen Leake
2010-08-04 12:52                       ` Robert A Duff
2010-08-04 14:32                         ` Dmitry A. Kazakov [this message]
2010-08-04 19:36                           ` Simon Wright
2010-08-04 19:46                             ` Dmitry A. Kazakov
2010-08-04 20:29                             ` Georg Bauhaus
2010-08-05 12:05                         ` Stephen Leake
2010-08-07  5:54                           ` Shark8
2010-08-07  8:56                             ` Georg Bauhaus
2010-08-07 13:49                               ` Shark8
2010-08-05 10:20                       ` Phil Clayton
2010-07-30 13:16           ` Henrique
2010-07-29 15:37   ` Warren
2010-07-29 14:56 ` Georg Bauhaus
2010-07-29 17:56   ` 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