【24h】

Correspondence polymorphism for object-oriented languages

机译:对面向对象语言的对应多态性

获取原文

摘要

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. Correspondence 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.
机译:在本文中,我们为面向对象语言提出了一种新的多态性,称为通信多态性。它位于不同的尺寸,而不是参数或亚型多态性。在对应多态性中,通过对应关系声明一些方法以对应于其他方法。利用这种关系,可以在各种类型上下文中重复使用非泛型代码 - 不一定是亚型或匹配的上下文 - 而不必为此重用计划。对应多态性具有优于其他富有表现因象类型系统的优点,因为程序员声明类型仍然可以是简单的一阶类型,这些类型很容易理解。我们定义了一种简单的语言LCP,反映了这些新想法,说明了具有多个示例的行为。我们为LCP提供了正式的类型规则和操作语义,并相对于减少建立类型系统的声音。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号