Correspondence polymorphism for object-oriented languages

Ran Rinat, Menachem Magidor, Scott F. Smith
1999 SIGPLAN notices  
In this paper we propose a new form of polymorphism for object-oriented languages, called correspondence polymorphism. It lies in a different dimension than either parametric or subtype polymorphism. In correspondence polymorphism, some methods are declared to correspond to other methods, via a correspondence relation. With this relation, it is possible to reuse non-generic code in various type contexts-not necessarily subtyping or matching contexts-without having to plan ahead for this reuse.
more » ... orrespondence polymorphism has advantages over other expressive object type systems in that programmer-declared types still may be simple, first-order types that are easily understood. We define a simple language LCP that reflects these new ideas, illustrating its behavior with multiple examples. We present formal type rules and an operational semantics for LCP, and establish soundness of the type system with respect to reduction.
doi:10.1145/320385.320399 fatcat:k5yizjgcefcy3kmmay6adjhlz4