扩展定量模式匹配范式
Extending the Quantitative Pattern-Matching Paradigm
AI总结:
本研究扩展非幂等交集类型系统以刻画带模式匹配的函数式编程语言的终止性,并证明其定量性质,即类型推导大小可上界求值步数。
摘要:
我们展示了如何将基于非幂等交集类型的(成熟)类型系统进行扩展,以刻画具有模式匹配特性的函数式编程语言的终止性质。为了建模此类编程语言,我们使用了一个(弱且封闭的)$\lambda$-演算,该演算集成了对代数数据类型(ADTs)的模式匹配机制。值得注意的是,我们还表明,这种语言不仅编码了Plotkin的CBV和CBN $\lambda$-演算以及其他包含性框架(如bang-演算),还可用于解释具有异常的效果性语言的语义。在对无类型语言进行深入研究后,我们引入了一个基于交集类型的类型系统,并通过纯逻辑方法表明,该语言的终止项集合恰好与良类型项集合相对应。此外,通过考虑非幂等交集类型,这种刻画被证明是定量的,即项t的类型推导的大小给出了从t到其规范形式的求值步数的上界。
英文摘要:
We show how (well-established) type systems based on non-idempotent intersection types can be extended to characterize termination properties of functional programming languages with pattern matching features. To model such programming languages, we use a (weak and closed) $λ$-calculus integrating a pattern matching mechanism on algebraic data types (ADTs). Remarkably, we also show that this language not only encodes Plotkin's CBV and CBN $λ$-calculus as well as other subsuming frameworks, such as the bang-calculus, but can also be used to interpret the semantics of effectful languages with exceptions. After a thorough study of the untyped language, we introduce a type system based on intersection types, and we show through purely logical methods that the set of terminating terms of the language corresponds exactly to that of well-typed terms. Moreover, by considering non-idempotent intersection types, this characterization turns out to be quantitative, i.e. the size of the type derivation of a term t gives an upper bound for the number of evaluation steps from t to its normal form.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。