**least specific type (tuple types)** *See* least specific type.

**least upper bound** Let *s* be a set; let a partial ordering be defined on *s*; and let *s′* be a subset of *s*. Then *x* is an upper bound for *s′* if and only if *x* ∊ *s* and *x* is greater than or equal to every element of *s′* with respect to the specified ordering. Moreover, if there do exist any such *x*’s, it’s easy to show there must be a smallest one, and that smallest *x* is the least upper bound (LUB) for *s′* with respect to the specified ordering. (Note that the LUB for *s′* might or might not itself be contained within *s′*.) *See also* lattice.

*Examples:* See the examples under type lattice.

**Liskov Substitution Principle** A principle frequently claimed as the origin of the notion of substitutability, q.v. Unfortunately the paper usually cited as the source for this principle—Barbara Liskov and Jeannette Wing, “A Behavioral Notion of Subtyping,” *ACM Transactions on Programming Languages and Systems 16*, No. 6, November 1994—appears not to contain any precise statement of the principle as such. The closest it gets seems to be as follows:

[Objects] of the subtype ought to behave the same as those of the supertype as far as anyone or any program using supertype objects can tell.

The term *objects* here refers to objects in the OO sense, of course; note, therefore, that the definition, if definition it is, fails to distinguish adequately between value and variable substitutability (*see Principle of Value Substitutability*; *Principle of Variable Substitutability ...*

Start Free Trial

No credit card required