Towards a program logic for JavaScript
File(s)TowardsProgramLogicJavaScriptPOPL2012.pdf (554.01 KB)
Accepted version
Author(s)
Gardner, P
Maffeis, S
Smith, G
Type
Conference Paper
Abstract
JavaScript has become the most widely used language for clientside
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.
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.
Date Issued
2012-01-27
Date Acceptance
2012-01-25
Citation
PPOPL '12 Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, 2012, pp.31-44
ISBN
978-1-4503-1083-3
Publisher
ACM
Start Page
31
End Page
44
Journal / Book Title
PPOPL '12 Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Copyright Statement
© 2012 ACM. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ACM Signplan Notices - POPL 2012, Vol. 47, Issue: 1, (2012) http://doi.acm.org/10.1145/2103656.2103663
Source
POPL 2012
Subjects
Science & Technology
Technology
Computer Science, Software Engineering
Computer Science
JavaScript
Separation Logic
Web
Publication Status
Published
Start Date
2012-01-25
Finish Date
2012-01-27
Coverage Spatial
Philadelphia, PA