【24h】

Typing record concatenation for free

机译:免费键入记录串联

获取原文

摘要

We show that any functional language with record extension possesses record concatenation for free. We exhibit a translation from the latter into the former. We obtain a type system for a language with record concatenation by composing the translation with type-checking in a language with record extension. We apply this method to a version of ML with a record extension and obtain an extension of ML with either asymmetric or symmetric concatenation. The latter extension is simple, flexible and has a very efficient type inference algorithm in practice. Concatenation together with removal of fields needs one more construct than extension of records. It can be added to the version of ML with record extension. However, many typed languages with record cannot type such a construct. The method still applies to them, producing type systems for record concatenation without removal of fields. Object systems also benefit of the encoding which shows that multiple inheritance does not actually require the concatenation of records but only their extension.

机译:

我们证明,任何具有记录扩展名的功能语言都具有免费的记录串联功能。我们展示了从后者到前者的翻译。我们通过将翻译与带有记录扩展名的语言进行类型检查组成翻译,从而获得具有记录串联的语言的类型系统。我们将此方法应用于具有记录扩展名的ML版本,并获得具有非对称或对称串联的ML扩展名。后一种扩展简单,灵活,并且在实践中具有非常有效的类型推断算法。串联和删除字段比构造扩展记录需要更多的构造。可以将其添加到带有记录扩展名的ML版本中。但是,许多具有记录的键入语言无法键入这样的构造。该方法仍然适用于它们,生成用于记录级联的类型系统,而无需删除字段。对象系统还受益于编码,该编码表明多重继承实际上并不需要记录的串联,而只需要其扩展即可。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号