【24h】

A Syntactic Type System for Recursive Modules

机译:递归模块的句法类型系统

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

摘要

A practical type system for ML-style recursive modules should address at least two technical challenges. First, it needs to solve the double vision problem, which refers to an inconsistency between external and internal views of recursive modules. Second, it needs to overcome the tension between practical decidability and expressivity which arises from the potential presence of cyclic type definitions caused by recursion between modules. Although type systems in previous proposals solve the double vision problem and are also decidable, they fail to typecheck common patterns of recursive modules, such as functor fixpoints, that are essential to the expressivity of the module system and the modular development of recursive modules. This paper proposes a novel type system for recursive modules that solves the double vision problem and type-checks common patterns of recursive modules including functor fixpoints. First, we design a type system with a type equivalence based on weak bisimilarity, which does not lend itself to practical implementation in general, but accommodates a broad range of cyclic type definitions. Then, we identify a practically implementable fragment using a type equivalence based on type normalization, which is expressive enough to typecheck typical uses of recursive modules. Our approach is purely syntactic and the definition of the type system is ready for use in an actual implementation.
机译:ML样式递归模块的实用类型系统应至少解决两个技术难题。首先,它需要解决双重视觉问题,这是指递归模块的内部视图与内部视图之间的不一致。其次,它需要克服实际可决策性与表达性之间的张力,这种张力是由模块之间的递归导致的循环类型定义的潜在存在引起的。尽管以前的提案中的类型系统解决了双重视觉问题并且也是可以决定的,但是它们无法对递归模块的通用模式(例如函子固定点)进行类型检查,这对于模块系统的表达能力和递归模块的模块化开发必不可少。本文提出了一种用于递归模块的新型类型系统,该系统可解决双重视觉问题并对包括函子定点在内的递归模块的常见模式进行类型检查。首先,我们基于弱双相似性设计具有类型等效性的类型系统,该类型系统一般不适合于实际实现,但可以容纳广泛的循环类型定义。然后,我们使用基于类型规范化的类型等效性来标识一个可实际实现的片段,该片段具有足够的表现力,可以对递归模块的典型用法进行类型检查。我们的方法纯属语法,类型系统的定义已准备好在实际实现中使用。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号