当前位置: X-MOL 学术J. Funct. Program. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Pure iso-type systems
Journal of Functional Programming ( IF 1.1 ) Pub Date : 2019-09-17 , DOI: 10.1017/s0956796819000108
YANPENG YANG , BRUNO C. D. S. OLIVEIRA

Traditional designs for functional languages (such as Haskell or ML) have separate sorts of syntax for terms and types. In contrast, many dependently typed languages use a unified syntax that accounts for both terms and types. Unified syntax has some interesting advantages over separate syntax, including less duplication of concepts, and added expressiveness. However, integrating unrestricted general recursion in calculi with unified syntax is challenging when some level of type-level computation is present, since properties such as decidable type-checking are easily lost. This paper presents a family of calculi called pure iso-type systems (PITSs), which employs unified syntax, supports general recursion and preserves decidable type-checking. PITS is comparable in simplicity to pure type systems (PTSs), and is useful to serve as a foundation for functional languages that stand in-between traditional ML-like languages and fully blown dependently typed languages. In PITS, recursion and recursive types are completely unrestricted and type equality is simply based on alpha-equality, just like traditional ML-style languages. However, like most dependently typed languages, PITS uses unified syntax, naturally supporting many advanced type system features. Instead of implicit type conversion, PITS provides a generalization of iso-recursive types called iso-types. Iso-types replace the conversion rule typically used in dependently typed calculus and make every type-level computation explicit via cast operators. Iso-types avoid the complexity of explicit equality proofs employed in other approaches with casts. We study three variants of PITS that differ on the reduction strategy employed by the cast operators: call-by-name, call-by-value and parallel reduction. One key finding is that while using call-by-value or call-by-name reduction in casts loses some expressive power, it allows those variants of PITS to have simple and direct operational semantics and proofs. In contrast, the variant of PITS with parallel reduction retains the expressive power of PTS conversion, at the cost of a more complex metatheory.

中文翻译:

纯同型系统

函数式语言(如 Haskell 或 ML)的传统设计对术语和类型有不同的语法。相反,许多依赖类型语言使用统一的语法来解释术语和类型。与单独的语法相比,统一语法具有一些有趣的优势,包括更少的概念重复和增加的表现力。然而,整合不受限制当存在某种级别的类型级计算时,具有统一语法的演算中的一般递归是具有挑战性的,因为诸如可判定的类型检查很容易丢失。本文介绍了一个称为微积分的家族纯同型系统(PITS) 采用统一的语法,支持通用递归并保留可判定的类型检查。PITS 在简单性上与纯类型系统(PTS),并且可用作介于传统的类似 ML 的语言和完全成熟的依赖类型语言之间的函数式语言的基础。在 PITS 中,递归和递归类型完全不受限制,类型相等只是基于 alpha 相等,就像传统的 ML 风格的语言一样。但是,与大多数依赖类型语言一样,PITS 使用统一的语法,自然支持许多高级类型系统功能。代替隐含的类型转换,PITS 提供了一个泛化等递归类型同型. Iso-types 取代了依赖类型演算中通常使用的转换规则,并通过强制转换运算符使每个类型级别的计算显式化。Iso-types 避免了在其他使用强制类型转换的方法中使用的显式等式证明的复杂性。我们研究了三种不同的 PITS 变体,它们在演员操作员所采用的减少策略上有所不同:点名,按值调用平行减少. 一个关键发现是,虽然在强制转换中使用按值调用或按名称减少调用会失去一些表达能力,但它允许 PITS 的这些变体具有简单而直接的操作语义和证明。相比之下,具有并行归约的 PITS 变体保留了 PTS 转换的表达能力,但代价是更复杂的元理论。
更新日期:2019-09-17
down
wechat
bug