Understanding Lua's Garbage Collection – Towards a Formalized Static Analyzer

05/26/2020
by   Mallku Soldevila, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/05/2022

Detecting Unjustified Assumptions in Subclasses via Elegant Objects Representation

Elegant Objects (EO) is a programming language based on ideas of pure ob...
research
06/04/2015

Programs as Polypeptides

We describe a visual programming language for defining behaviors manifes...
research
06/04/2020

Quantum Markov Chain Semantics for Quip-E Programs

In this work we present a mapping from a fragment of the quantum program...
research
05/10/2022

The Move Borrow Checker

The Move language provides abstractions for programming with digital ass...
research
09/05/2022

Detecting unanticipated mutual recursion using Elegant Objects representation of object-oriented programs

Elegant Objects (EO) is a variation of the object-oriented programming p...
research
05/24/2022

Modeling Asymptotic Complexity Using ACL2

The theory of asymptotic complexity provides an approach to characterizi...

Please sign up or login with your details

Forgot password? Click here to reset