【24h】

Formal parametric polymorphism

机译:形式参数多态性

获取原文

摘要

A polymorphic function is parametric if its behavior does notdepend on the type at which it is instantiated. Starting with Reynolds'work, the study of parametricity is typically semantic. In this paper,we develop a syntactic approach to parametricity, and a formal systemthat embodies this approach: system R. Girard's system F deals with terms and types;R is an extension of F that deals also with relationsbetween types.

In R**, it is possible to derive theorems about functionsfrom their types, or "theorems for free", as Wadler callsthem. An easy "theorem for free"

asserts that the type XX→Bool contains only constantfunctions; this is not provable in F. There are many harder and moresubstantial examples. Various metatheoremscan also be obtained, such asa syntactic version of Reynolds' abstraction theorem.

机译:

如果一个多态函数的行为不依赖于其实例化的类型,则它是参数化的。从雷诺兹的工作开始,对参数性的研究通常是语义性的。在本文中,我们开发了一种用于参数化的句法方法,以及一个体现该方法的形式系统:系统 R 。 Girard的系统F处理术语和类型; R 是F的扩展,它还处理类型之间的关系。

R **中,可以从函数的类型推导有关函数的定理,或“免费的定理” ,正如Wadler所称。一个简单的“免费定理”

声明类型 X X→ <?Pub Caret> Bool仅包含常量函数;这在F中是无法证明的。有许多更困难,更实质性的例子。还可以获得各种元定理,例如雷诺的抽象定理的句法版本。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号