子结构参数化性质
Substructural Parametricity
AI总结:
本文开发了一族用代数参数化的一元逻辑关系,为有序、线性等子结构类型系统证明参数化性质,并推导出列表操作等特定类型 inhabitant 的外延性质。
摘要:
有序、线性及其他子结构类型系统允许我们在类型的语法层面揭示程序的深层性质。在本文中,我们开发了一族一元逻辑关系,使我们能够为一系列子结构类型系统证明参数化性质的推论。一个关键思想是用一个代数对该关系进行参数化,我们以 monoid 和 commutative monoid 为例来分别解释有序和线性类型系统。我们证明了逻辑关系的基本定理,并将其应用于推导特定类型 inhabitant 的外延性质。示例包括证明列表追加和反转的有序类型恰好由一个函数 inhabit,以及某些树遍历的类型也是如此。类似地,列表上恒等函数的线性类型仅由输入的排列 inhabit。我们最先进的示例表明,列表 fold 函数的有序类型仅由 fold 函数 inhabit。
英文摘要:
Ordered, linear, and other substructural type systems allow us to expose deep properties of programs at the syntactic level of types. In this paper, we develop a family of unary logical relations that allow us to prove consequences of parametricity for a range of substructural type systems. A key idea is to parameterize the relation by an algebra, which we exemplify with a monoid and commutative monoid to interpret ordered and linear type systems, respectively. We prove the fundamental theorem of logical relations and apply it to deduce extensional properties of inhabitants of certain types. Examples include demonstrating that the ordered types for list append and reversal are inhabited by exactly one function, as are types of some tree traversals. Similarly, the linear type of the identity function on lists is inhabited only by permutations of the input. Our most advanced example shows that the ordered type of the list fold function is inhabited only by the fold function.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。