« Rewarding Failure | Main | Microsoft/Yahoo vs. Google: Who Wins? »

July 15, 2009


Feed You can follow this conversation by subscribing to the comment feed for this post.

cheap viagra

Liskov's notion of a behavioral subtype defines a notion of substitutability for mutable objects; that is, if S is a subtype of T, then objects of type T in a program may be replaced with objects of type S without altering any of the desirable properties of that program (e.g., correctness).

Behavioral subtyping is a stronger notion than typical subtyping of functions defined in type theory, which relies only on the contravariance of argument types and covariance of the return type. Behavioral subtyping is trivially undecidable in general: if q is the property "method foo always terminates", then it's impossible for a program (compiler) to verify that it holds true for some subtype S of T even if q does hold for T. The principle is useful however in reasoning about the design of class hierarchies.

The comments to this entry are closed.