扩展定量模式匹配范式

Sandra Alves, Delia Kesner, Miguel Ramos
{"title":"扩展定量模式匹配范式","authors":"Sandra Alves, Delia Kesner, Miguel Ramos","doi":"arxiv-2408.11007","DOIUrl":null,"url":null,"abstract":"We show how (well-established) type systems based on non-idempotent\nintersection types can be extended to characterize termination properties of\nfunctional programming languages with pattern matching features. To model such\nprogramming languages, we use a (weak and closed) $\\lambda$-calculus\nintegrating a pattern matching mechanism on algebraic data types (ADTs).\nRemarkably, we also show that this language not only encodes Plotkin's CBV and\nCBN $\\lambda$-calculus as well as other subsuming frameworks, such as the\nbang-calculus, but can also be used to interpret the semantics of effectful\nlanguages with exceptions. After a thorough study of the untyped language, we\nintroduce a type system based on intersection types, and we show through purely\nlogical methods that the set of terminating terms of the language corresponds\nexactly to that of well-typed terms. Moreover, by considering non-idempotent\nintersection types, this characterization turns out to be quantitative, i.e.\nthe size of the type derivation of a term t gives an upper bound for the number\nof evaluation steps from t to its normal form.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"20 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-08-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Extending the Quantitative Pattern-Matching Paradigm\",\"authors\":\"Sandra Alves, Delia Kesner, Miguel Ramos\",\"doi\":\"arxiv-2408.11007\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We show how (well-established) type systems based on non-idempotent\\nintersection types can be extended to characterize termination properties of\\nfunctional programming languages with pattern matching features. To model such\\nprogramming languages, we use a (weak and closed) $\\\\lambda$-calculus\\nintegrating a pattern matching mechanism on algebraic data types (ADTs).\\nRemarkably, we also show that this language not only encodes Plotkin's CBV and\\nCBN $\\\\lambda$-calculus as well as other subsuming frameworks, such as the\\nbang-calculus, but can also be used to interpret the semantics of effectful\\nlanguages with exceptions. After a thorough study of the untyped language, we\\nintroduce a type system based on intersection types, and we show through purely\\nlogical methods that the set of terminating terms of the language corresponds\\nexactly to that of well-typed terms. Moreover, by considering non-idempotent\\nintersection types, this characterization turns out to be quantitative, i.e.\\nthe size of the type derivation of a term t gives an upper bound for the number\\nof evaluation steps from t to its normal form.\",\"PeriodicalId\":501197,\"journal\":{\"name\":\"arXiv - CS - Programming Languages\",\"volume\":\"20 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-08-20\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Programming Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2408.11007\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.11007","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

我们展示了如何将基于非幂交集类型的(成熟的)类型系统扩展到表征具有模式匹配特征的函数式编程语言的终止属性。值得注意的是,我们还展示了这种语言不仅编码了普洛特金的CBV和CBN $\lambda$-calculus 以及其他子包含框架,比如砰算,而且还可以用来解释具有异常的效果语言的语义。在对无类型语言进行深入研究之后,我们引入了基于交集类型的类型系统,并通过纯逻辑方法证明了该语言的终止项集与类型良好的终止项集完全对应。此外,通过考虑非幂等交集类型,我们发现这种表征是定量的,即术语 t 的类型推导的大小给出了从 t 到其正常形式的求值步骤数的上限。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Extending the Quantitative Pattern-Matching Paradigm
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) $\lambda$-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 $\lambda$-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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Memory Consistency and Program Transformations No Saved Kaleidosope: an 100% Jitted Neural Network Coding Language with Pythonic Syntax Towards Quantum Multiparty Session Types The Incredible Shrinking Context... in a decompiler near you Scheme Pearl: Quantum Continuations
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1