路径多态的类型可靠性
Type Soundness for Path Polymorphism
摘要:
路径多态性是定义函数的能力,这些函数可以在任意递归指定的数据结构上统一操作。它的本质是由$x\,y$形式的模式捕获的,这些模式将复合数据结构分解为各个部分。对这些类型的模式进行分类是具有挑战性的,因为化合物的类型应该决定其组分的类型。我们提出了一个静态类型系统(即没有运行时分析)的模式演算,捕捉这一功能。我们的解决方案结合了类型应用,常量类型,联合类型和递归类型。我们解决的基本属性的主题减少和进步,保证一个良好的行为动态。这两个结果都依赖于至关重要的模式兼容性的概念,也对一个共归纳表征的亚型。
英文摘要:
Path polymorphism is the ability to define functions that can operate uniformly over arbitrary recursively specified data structures. Its essence is captured by patterns of the form $x\,y$ which decompose a compound data structure into its parts. Typing these kinds of patterns is challenging since the type of a compound should determine the type of its components. We propose a static type system (i.e. no run-time analysis) for a pattern calculus that captures this feature. Our solution combines type application, constants as types, union types and recursive types. We address the fundamental properties of Subject Reduction and Progress that guarantee a well-behaved dynamics. Both these results rely crucially on a notion of pattern compatibility and also on a coinductive characterisation of subtyping.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。