当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Understanding Lua's Garbage Collection -- Towards a Formalized Static Analyzer
arXiv - CS - Programming Languages Pub Date : 2020-05-26 , DOI: arxiv-2005.13057
Mallku Soldevila, Beta Ziliani, Daniel Fridlender

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 的影响。我们的 GC 模型通过机械化实验在实践中得到验证,并在理论上通过证明几个健全性属性得到验证。
更新日期:2020-05-28
down
wechat
bug