首页> 外文期刊>ACM SIGPLAN Notices: A Monthly Publication of the Special Interest Group on Programming Languages >Modular Typechecking for Hierarchically Extensible Datatypes and Functions
【24h】

Modular Typechecking for Hierarchically Extensible Datatypes and Functions

机译:分层可扩展数据类型和函数的模块化类型检查

获取原文
获取原文并翻译 | 示例
       

摘要

One promising approach for adding object-oriented (OO) facilities to functional languages like ML is to generalize the existing datatype and function constructs to be hierarchical and extensible, so that datatype variants simulate classes and function cases simulate methods. This approach allow existing datatypes to be easily extended with both new operations and new variants, resolving a long-standing conflict between the functional and OO styles. However, previous designs based on this approach have been forced to give up modular typechecking, requiring whole-program checks to ensure type safety. We describe Extensible ML (Eml), an ML-like language that supports hierarchical, extensible datatypes and functions while preserving purely modular typechecking. To achieve this result, Eml's type system imposes a few requirements on datatype and function extensibility, but Eml is still able to express both traditional functional and OO idioms. We have formalized a core version of Eml and proven the associated type system sound, and we have developed a prototype interpreter for the language.
机译:向诸如ML之类的功能语言中添加面向对象(OO)设施的一种有前途的方法是将现有的数据类型和功能结构泛化为分层且可扩展的,以便数据类型变体模拟类,而功能案例模拟方法。这种方法允许使用新操作和新变体轻松扩展现有数据类型,从而解决了功能和OO样式之间的长期冲突。但是,以前基于这种方法的设计被迫放弃模块化类型检查,而需要进行整个程序检查以确保类型安全。我们描述了可扩展ML(Eml),这是一种类似于ML的语言,它支持分层的,可扩展的数据类型和功能,同时保留纯模块化的类型检查。为了获得此结果,Eml的类型系统对数据类型和功能可扩展性提出了一些要求,但是Eml仍然能够表达传统的功能和OO习惯用语。我们已经正式确定了Eml的核心版本并证明了相关的类型系统声音,并且我们已经开发了该语言的原型解释器。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号