Go backward to Denotational Semantics
Go up to Top
Go forward to Subtyping of Function Types
Extension of Subtyping
- Other parts of programming language:
- Subtyping on modules.
- pidec <= pidec if pi
<= pi
- fun A=2, proc A=skip
- {A:intexp}dec <= {}dec
- {A:comm}dec <= {}dec
- {A:intexp}dec or {A:comm}dec?
- Two different incorrect typings!
- Function types:
- thetatheta
<= thetatheta
if theta <= theta and theta
<= theta
- Contravariance of argument and result types!
- Example:
- TRUNC: realexp intexp
- Result can be extended to realexp
- Argument can be extended to realexp
- TRUNC: intexp realexp!
Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: qualification.tex,v 1.2 1996/05/02 11:53:49 schreine Exp schreine