Understanding Lua’s Garbage Collection: Towards a Formalized Static Analyzer

Mallku Soldevila, Beta Ziliani, Daniel Fridlender
{"title":"Understanding Lua’s Garbage Collection: Towards a Formalized Static Analyzer","authors":"Mallku Soldevila, Beta Ziliani, Daniel Fridlender","doi":"10.1145/3414080.3414093","DOIUrl":null,"url":null,"abstract":"We provide the semantics of garbage collection (GC) for the Lua programming language. Of interest are the inclusion of finalizers (akin to destructors in object-oriented languages) and weak tables (a particular implementation of weak references). The model expresses several aspects relevant to GC that are not covered in Lua’s documentation but that, nevertheless, affect the observable behavior of programs. Our model is mechanized and can be tested with real programs. Our long-term goal is to provide a formalized static analyzer of Lua programs to detect potential dangers. As a first step, we provide a prototype tool, LuaSafe, that typechecks programs to ensure their behavior is not affected by GC. Our model of GC is validated in practice by the experimentation with its mechanization, and in theory by proving several soundness properties.","PeriodicalId":328721,"journal":{"name":"Proceedings of the 22nd International Symposium on Principles and Practice of Declarative Programming","volume":"19 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-05-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 22nd International Symposium on Principles and Practice of Declarative Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3414080.3414093","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

We provide the semantics of garbage collection (GC) for the Lua programming language. Of interest are the inclusion of finalizers (akin to destructors in object-oriented languages) and weak tables (a particular implementation of weak references). The model expresses several aspects relevant to GC that are not covered in Lua’s documentation but that, nevertheless, affect the observable behavior of programs. Our model is mechanized and can be tested with real programs. Our long-term goal is to provide a formalized static analyzer of Lua programs to detect potential dangers. As a first step, we provide a prototype tool, LuaSafe, that typechecks programs to ensure their behavior is not affected by GC. Our model of GC is validated in practice by the experimentation with its mechanization, and in theory by proving several soundness properties.
理解Lua的垃圾收集:走向形式化的静态分析器
我们为Lua编程语言提供了垃圾收集(GC)的语义。令人感兴趣的是包含了终结器(类似于面向对象语言中的析构函数)和弱表(弱引用的一种特殊实现)。该模型表达了与GC相关的几个方面,这些方面在Lua文档中没有涉及,但是它们会影响程序的可观察行为。我们的模型是机械化的,可以用实际程序进行测试。我们的长期目标是为Lua程序提供一个形式化的静态分析器,以检测潜在的危险。作为第一步,我们提供了一个原型工具LuaSafe,它可以对程序进行类型检查,以确保它们的行为不受GC的影响。我们的模型在实践中通过机械化实验得到了验证,在理论上通过证明了几个性能的合理性得到了验证。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
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学术官方微信