Boost logo

Boost :

From: Andrew J Bromage (ajb_at_[hidden])
Date: 2002-08-04 20:22:22

G'day all.

On Fri, Aug 02, 2002 at 10:37:16AM -0400, Douglas Gregor wrote:

> Your definition of "bottom" is that of a nonexistent value, which can also be
> thought of as 'too much (conflicting) information' This is like an undefined
> value in mathematics, or the 'result' you get if you assume that a boolean
> condition p is both true and false at the same time. The return value from a
> nonterminating function also fits this definition, because there is no actual
> value returned from that function.

Actually, our definitions are the same. In functional denotational
semantics, "bottom" does indeed mean "not enough information". It
just happens to be the case that there's not enough information to
compute the value of the function at run-time.

(Aside: It's not quite as simple as this, but we're getting way

> Lattice theory unifies these, and I suspect that's why Andrew brought it up
> :).

That's right. :-)

Besides, in static analysis of programs, there's a lot of call for
taking a physical type, such as bool, an enumeration, or IEEE floating
point numbers and adding a top and bottom element (or often just
bottom), with the obvious meet and join functions.

> I think I'm in favor of "unknown" (and "undefined", when someone needs it).
> They're both reasonably short and I think they can apply without confusion to
> most of the extensions that have been proposed.

The problem is that while tribools have a well-understood calculus,
they are suited to many varied interpretations. Calling the third
value "unknown", "undefined", "maybe", "bottom" or whatever sounds
to me like calling your floating point type "length" or "probability".

Unfortunately, I don't think there is a better name, so I'm not
going to argue with whatever is chosen.

Andrew Bromage

Boost list run by bdawes at, gregod at, cpdaniel at, john at