topical media & game development
This chapter has treated polymorphism
from a foundational perspective.
In section 1,
we looked at abstract inheritance as
employed in knowledge representation.
- abstract inheritance -- declarative relation
- inheritance networks -- non-monotonic reasoning
- taxonomic structure -- predicate calculus
slide: Section 9.1: Abstract inheritance
We discussed the non-monotonic aspects
of inheritance networks
and looked at a first order logic
interpretation of taxonomic
- types -- sets of values
- the subtype relation -- refinement rules
- functions -- contravariance
- objects -- as records
slide: Section 9.2: The subtype relation
In section 2,
a characterization of types as sets of values
We looked at a formal definition of the
subtype relation and discussed
the refinement rules for functions and objects.
- typing -- protection against errors
- flavors -- parametric, inclusion, overloading, coercion
- inheritance -- incremental modification mechanism
slide: Section 9.3: Flavors of polymorphism
In section 3,
we discussed types as a means to prevent errors,
and distinguished between various flavors
including parametric polymorphism,
inclusion polymorphism, overloading and
Inheritance was characterized as an incremental
modification mechanism, resulting in
- subtypes -- typed lambda calculus
- overloading -- intersection types
- bounded polymorphism -- generics and inheritance
slide: Section 9.4: Type abstraction
In section 4,
some formal type calculi were presented,
based on the typed lambda calculus.
These included a calculus for simple subtyping,
a calculus for overloading,
employing intersection types,
and a calculus for bounded polymorphism,
employing type abstraction.
Examples were discussed illustrating the (lack of) features
of the C++ type system.
- hiding -- existential types
- packages -- abstract data types
slide: Section 9.5: Existential types
In section 5,
we looked at a calculus employing
existential types, modeling abstract
and hiding by means of packages
and type abstraction.
- self-reference -- recursive types
- object semantics -- unrolling
- inheritance -- dynamic binding
- subtyping -- inconsistencies
slide: Section 9.6: Self-reference
Finally, in section 6, we discussed self-reference
and looked at a calculus employing recursive
It was shown how object semantics may be determined
by unrolling, and we studied the semantic
interpretation of dynamic binding.
Concluding this chapter, an example was given
showing an inconsistency in the
Eiffel type system.
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.