异常处理和经典逻辑

S. V. Bakel
{"title":"异常处理和经典逻辑","authors":"S. V. Bakel","doi":"10.1145/3354166.3354186","DOIUrl":null,"url":null,"abstract":"We present λtry, an extension of the λ-calculus with named exception handling, via try, throw and catch, and present a basic notion of type assignment expressing recoverable exception handling and show that it is sound. We define an interpretation for λtry to Parigot's λμ-calculus, and show that reduction (both lazy and call by value) is preserved by the interpretation. We will show that also types assignable in the basic system are preserved by the interpretation. We will then add a notion of total failure through halt that escapes applicative contexts without being caught by a handler, and show that we can interpret this in λμ when adding top as destination. We will argue that introducing handlers for halt will break the relation with λμ. We will conclude the paper by showing that it is possible to add handlers for program failure by introducing panic and dedicated handlers to λtry. We will need to extend the language with a conditional construct that is typed in a non-traditional way, that cannot be expressed in λμ or logic. This will allow both recoverable exceptions and total failure, dealt with by handlers; we will show a non-standard soundness result for this system.","PeriodicalId":182058,"journal":{"name":"Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming","volume":"12 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-10-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Exception Handling and Classical Logic\",\"authors\":\"S. V. Bakel\",\"doi\":\"10.1145/3354166.3354186\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We present λtry, an extension of the λ-calculus with named exception handling, via try, throw and catch, and present a basic notion of type assignment expressing recoverable exception handling and show that it is sound. We define an interpretation for λtry to Parigot's λμ-calculus, and show that reduction (both lazy and call by value) is preserved by the interpretation. We will show that also types assignable in the basic system are preserved by the interpretation. We will then add a notion of total failure through halt that escapes applicative contexts without being caught by a handler, and show that we can interpret this in λμ when adding top as destination. We will argue that introducing handlers for halt will break the relation with λμ. We will conclude the paper by showing that it is possible to add handlers for program failure by introducing panic and dedicated handlers to λtry. We will need to extend the language with a conditional construct that is typed in a non-traditional way, that cannot be expressed in λμ or logic. This will allow both recoverable exceptions and total failure, dealt with by handlers; we will show a non-standard soundness result for this system.\",\"PeriodicalId\":182058,\"journal\":{\"name\":\"Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming\",\"volume\":\"12 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2019-10-07\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3354166.3354186\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3354166.3354186","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

摘要

通过try、throw和catch,我们提出了λ-演算的扩展λtry,通过命名异常处理,给出了表示可恢复异常处理的类型赋值的基本概念,并证明了它的正确性。我们对Parigot的λμ-演算给出了λtry的解释,并证明了这种解释保留了惰性约简和按值调用的约简。我们将证明在基本系统中可赋值的类型也被解释保留。然后,我们将添加一个通过halt的完全失败的概念,该概念可以在不被处理程序捕获的情况下转义应用上下文,并表明当将top添加为目标时,我们可以在λμ中解释它。我们将论证为halt引入处理函数将打破与λμ的关系。我们将通过展示通过引入panic和专用处理程序来添加程序失败处理程序的可能性来结束本文。我们需要用一种非传统的方式输入的条件结构来扩展语言,这种结构不能用λμ或逻辑来表示。这将允许可恢复的异常和完全失败,由处理程序处理;我们将展示该系统的非标准稳健性结果。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Exception Handling and Classical Logic
We present λtry, an extension of the λ-calculus with named exception handling, via try, throw and catch, and present a basic notion of type assignment expressing recoverable exception handling and show that it is sound. We define an interpretation for λtry to Parigot's λμ-calculus, and show that reduction (both lazy and call by value) is preserved by the interpretation. We will show that also types assignable in the basic system are preserved by the interpretation. We will then add a notion of total failure through halt that escapes applicative contexts without being caught by a handler, and show that we can interpret this in λμ when adding top as destination. We will argue that introducing handlers for halt will break the relation with λμ. We will conclude the paper by showing that it is possible to add handlers for program failure by introducing panic and dedicated handlers to λtry. We will need to extend the language with a conditional construct that is typed in a non-traditional way, that cannot be expressed in λμ or logic. This will allow both recoverable exceptions and total failure, dealt with by handlers; we will show a non-standard soundness result for this system.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信