Transplanting of Environments between Closures in the lambda calculus

S. Nishizaki
{"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}
引用次数: 0

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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
在lambda演算中的闭包之间移植环境
在编程语言中,函数闭包是这样一种函数,它的函数体可能包含自由变量,并伴随着与这些变量的值的关联。变量与其值的关联称为环境。如果一种编程语言使用词法作用域并将函数视为一级对象,那么函数闭包是强制性的。Common Lisp、Emacs Lisp、Scheme和其他Lisp方言以及现代脚本语言(如Python、JavaScript和Ruby)和过程语言(如c++)都提供了函数闭包。在我们之前的论文中,我们提出了一种机制,使我们能够从函数闭包中提取环境部分。然而,它带来了必须将环境作为一级对象来处理的情况,这是传统理论的一个巨大延伸,如果可能的话要避免,因为一些理想的属性将会丢失。本文提出了一种将lambda演算中的函数闭包环境替换为另一个函数闭包环境的方法。通过采用这种方法而不是从函数闭包中提取环境并使用它,可以避免将环境直接视为第一类对象。我们引入了一个新的计算系统,称为λ演算与环境移植来探索这一过程的理论方面。我们的系统是由它的语法和约简规则定义的,我们通过对带有记录的lambda演算的转换为它提供语义。约简的合理性在这个转换语义中得到了证明。此外,我们给出了一个简单的类型系统,并展示了它的主题约简系统。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
The Use of Dynamic n-Gram to Enhance TF-IDF Features Extraction for Bahasa Indonesia Cyberbullying Classification Development of IT Equipment Management Methodology based on Carbon Emission and End-of-Life Period with A Design Thinking Approach: Case Study: Bandung Institute of Technology Formal Specification and Model Checking of Raft Leader Election in Maude* An Ontology-based Modeling for Classifying Risk of Suicidal Behavior String Figure Simulation with Multiresolution Wire Model
×
引用
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