Foundations of Object-Oriented Languages: Types and Semantics