Towards a program logic for JavaScript
By Philippa Gardner, Sergio Maffeis, Gareth Smith. 2012
91 citations recorded by the source corpus.
JavaScript has become the most widely used language for client-side web programming. The dynamic nature of JavaScript makes understanding its code notoriously difficult, leading to buggy programs and a lack of adequate static-analysis tools. We believe that logical reasoning has much to offer JavaScript: a simple description of program behaviour, a clear understanding of module boundaries, and the ability to verify security contracts. We introduce a program logic for reasoning about a broad subset of JavaScript, including challenging features such as prototype inheritance and "with". We adapt ideas from separation logic to provide tractable reasoning about JavaScript code: reasoning about easy programs is easy; reasoning about hard programs is possible. We prove a strong soundness result. All libraries written in our subset and proved correct with respect to their specifications will be well-behaved, even when called by arbitrary JavaScript code.
Subfields: Artificial Intelligence, Signal Processing
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Panagiotis Vekris
- Benjamin Cosman
- Ranjit Jhala
- Gavin M. Bierman
- Martín Abadi
- Mads Torgersen
- David Herman
- Ravi Chugh
In Signal Processing
Citations in the corpus
- Understanding TypeScript (2014, background): “[7], although we make a number of simplifications.”
- Dependent types for JavaScript (2011, background): “By dividing work between syntactic subtyping and SMT-based validity checking, the calculus supports fully automatic checking of dynamic features like run-time type tests, value-indexed dictionaries, higher-order functions, and polymorphism.”
- Refinement types for TypeScript (2016, background): “those that do not require tracking aliases, capabilities or separation logic [11, 29].”