Resp ectful Type Converters
Jeannette M Wing John Ockerbloom
May
CMU CS
School of Computer Science
Carnegie Mellon University
Pittsburgh PA
Submitted to IEEE Transactions on Software Engineering
Abstract
In converting an ob ject of one type to another we exp ect some of the original ob ject s b ehavior to remain
the same and some to change How can we state the relationship b etween the original ob ject and converted
ob ject to characterize what information is preserved and what is lost after the conversion takes place
We answer this question by introducing the new relation respects and say that a type converter function
C A B respects a type T We formally de ne respects in terms of the Liskov and Wing b ehavioral notion
of subtyping types A and B are subtypes of T
We explain in detail the applicability of resp ectful type converters in the context of the Typed Ob ject Mo del