在lambda演算中的闭包之间移植环境

S. Nishizaki
{"title":"在lambda演算中的闭包之间移植环境","authors":"S. Nishizaki","doi":"10.1145/3587828.3587847","DOIUrl":null,"url":null,"abstract":"In programming languages, a function closure is a function whose body includes possibly free variables and that is accompanied by association with their values. The association of variables with their values is called an environment. If a programming language uses lexical scope and treats functions as first-class objects, then function closures are mandatory. Function closures are provided in Common Lisp, Emacs Lisp, Scheme and other dialects of LISP, as well as in modern scripting languages such as Python, JavaScript and Ruby, and procedural languages such as C++. In our previous paper, we proposed a mechanism that enables us to extract an environment part from a function closure. However, it brings a situation that environments must be handled as a first-class object, which is a huge extension of the traditional theory to be avoid if possible, since several desirable properties will be lost. This paper presents a method for replacing the environment of a function closure in the lambda calculus with the environment of another function closure. By taking this approach rather than extracting the environment from the function closure and using it, it ise to avoid treating the environment directly as a first-class object. We introduce a new computational system called lambda calculus with environment transplantation to explore the theoretical aspects of this process. Our system is defined by its syntax and reduction rules, and we provide a semantics for it through a transformation to the lambda calculus with records. The soundness of the reduction is demonstrated within this transformation semantics. Additionally, we give a simple type system to our calculus and show its subject reduction system.","PeriodicalId":340917,"journal":{"name":"Proceedings of the 2023 12th International Conference on Software and Computer Applications","volume":"13 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-02-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Transplanting of Environments between Closures in the lambda calculus\",\"authors\":\"S. Nishizaki\",\"doi\":\"10.1145/3587828.3587847\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"In programming languages, a function closure is a function whose body includes possibly free variables and that is accompanied by association with their values. The association of variables with their values is called an environment. If a programming language uses lexical scope and treats functions as first-class objects, then function closures are mandatory. Function closures are provided in Common Lisp, Emacs Lisp, Scheme and other dialects of LISP, as well as in modern scripting languages such as Python, JavaScript and Ruby, and procedural languages such as C++. In our previous paper, we proposed a mechanism that enables us to extract an environment part from a function closure. However, it brings a situation that environments must be handled as a first-class object, which is a huge extension of the traditional theory to be avoid if possible, since several desirable properties will be lost. This paper presents a method for replacing the environment of a function closure in the lambda calculus with the environment of another function closure. By taking this approach rather than extracting the environment from the function closure and using it, it ise to avoid treating the environment directly as a first-class object. We introduce a new computational system called lambda calculus with environment transplantation to explore the theoretical aspects of this process. Our system is defined by its syntax and reduction rules, and we provide a semantics for it through a transformation to the lambda calculus with records. The soundness of the reduction is demonstrated within this transformation semantics. Additionally, we give a simple type system to our calculus and show its subject reduction system.\",\"PeriodicalId\":340917,\"journal\":{\"name\":\"Proceedings of the 2023 12th International Conference on Software and Computer Applications\",\"volume\":\"13 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-02-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 2023 12th International Conference on Software and Computer Applications\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3587828.3587847\",\"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 2023 12th International Conference on Software and Computer Applications","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3587828.3587847","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

在编程语言中,函数闭包是这样一种函数,它的函数体可能包含自由变量,并伴随着与这些变量的值的关联。变量与其值的关联称为环境。如果一种编程语言使用词法作用域并将函数视为一级对象,那么函数闭包是强制性的。Common Lisp、Emacs Lisp、Scheme和其他Lisp方言以及现代脚本语言(如Python、JavaScript和Ruby)和过程语言(如c++)都提供了函数闭包。在我们之前的论文中,我们提出了一种机制,使我们能够从函数闭包中提取环境部分。然而,它带来了必须将环境作为一级对象来处理的情况,这是传统理论的一个巨大延伸,如果可能的话要避免,因为一些理想的属性将会丢失。本文提出了一种将lambda演算中的函数闭包环境替换为另一个函数闭包环境的方法。通过采用这种方法而不是从函数闭包中提取环境并使用它,可以避免将环境直接视为第一类对象。我们引入了一个新的计算系统,称为λ演算与环境移植来探索这一过程的理论方面。我们的系统是由它的语法和约简规则定义的,我们通过对带有记录的lambda演算的转换为它提供语义。约简的合理性在这个转换语义中得到了证明。此外,我们给出了一个简单的类型系统,并展示了它的主题约简系统。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Transplanting of Environments between Closures in the lambda calculus
In programming languages, a function closure is a function whose body includes possibly free variables and that is accompanied by association with their values. The association of variables with their values is called an environment. If a programming language uses lexical scope and treats functions as first-class objects, then function closures are mandatory. Function closures are provided in Common Lisp, Emacs Lisp, Scheme and other dialects of LISP, as well as in modern scripting languages such as Python, JavaScript and Ruby, and procedural languages such as C++. In our previous paper, we proposed a mechanism that enables us to extract an environment part from a function closure. However, it brings a situation that environments must be handled as a first-class object, which is a huge extension of the traditional theory to be avoid if possible, since several desirable properties will be lost. This paper presents a method for replacing the environment of a function closure in the lambda calculus with the environment of another function closure. By taking this approach rather than extracting the environment from the function closure and using it, it ise to avoid treating the environment directly as a first-class object. We introduce a new computational system called lambda calculus with environment transplantation to explore the theoretical aspects of this process. Our system is defined by its syntax and reduction rules, and we provide a semantics for it through a transformation to the lambda calculus with records. The soundness of the reduction is demonstrated within this transformation semantics. Additionally, we give a simple type system to our calculus and show its subject reduction 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学术文献互助群
群 号:481959085
Book学术官方微信