What? This is a static analysis prototype for
convervatively predicting run-time types of Lua programs.
Why? To push the bounds for static checking of
dynamically-typed languages, to help Lua
programmers, and to illustrate a paper we wrote.
How? The analysis
is an
abstract interpreter implemented in OCaml, that is,
it computes a sound, compile-time overapproximation of the
run-time values of a Lua program over a dedicated
lattice structure.
The analysis has been compiled to JavaScript with
Js_of_ocaml
and glued together with
CodeMirror and
the Text Hover addon.
Caveat: this software is an academic prototype.
The tool calculates a whole-program analysis, hence
requires the full source code. Currently it supports only a subset of Lua 5.1: