Go backward to Dynamically Scoped Objects
Go up to Top
Go forward to Minimal Types
Subtyping
- Typing system that formalizes subtyping:
- Type attributes theta <= theta
- theta is subtype of theta
- Phrase of type theta can be used in any context that demands
phrase of type theta.
- <= is reflexive and transitive.
- Example: mixed mode arithmetic.
- int <= real
- tau <= tau tauexp
<= tauexp.
- Typing rules:
-
pi |- E: theta |
pi |- E: theta
|
if theta <=theta
-
pi |- E: tauexp | pi |- E:
tauexp |
pi |- E+E: tauexp
|
-
pi |- E: tau |
pi |- E: tauexp
|
tau in{int, real}
-
Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: qualification.tex,v 1.2 1996/05/02 11:53:49 schreine Exp schreine