Abstract
We present S5, a semantics for the strict mode of the ECMAScript 5.1 (JavaScript) programming language. S5 shrinks the large source language into a manageable core through an implemented transformation. The resulting specification has been tested against real-world conformance suites for the language. This paper focuses on two aspects of S5: accessors (getters and setters) and eval. Since these features are complex and subtle in JavaScript, they warrant special study. Variations on both features are found in several other programming languages, so their study is likely to have broad applicability.
- C. Anderson and P. Giannini. Type checking for JavaScript. Electronic Notes in Theoretical Computer Science, 138 (2): 37 -- 58, 2005. Proceedings of the Second Workshop on Object Oriented Developments. Google Scholar
Digital Library
- R. Chugh, J. A. Meister, R. Jhala, and S. Lerner. Staged Information Flow for JavaScript. In Programming Languages Design and Implementation, 2009. Google Scholar
Digital Library
- P. Di Gianantonio, F. Honsell, and L. Liquori. A lambda calculus of objects with self-inflicted extension. SIGPLAN Notices, 33 (10): 166--178, 1998. Google Scholar
Digital Library
- ECMA International. ECMAScript Edition 5.1. URL http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.p%df.Google Scholar
- M. Felleisen, R. B. Findler, and M. Flatt. Semantics Engineering with PLT Redex. MIT Press, 2009. Google Scholar
Digital Library
- M. Flatt, S. Krishnamurthi, and M. Felleisen. A programmer's reduction semantics for classes and mixins. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1998.Google Scholar
- A. Guha, C. Saftoiu, and S. Krishnamurthi. The Essence of JavaScript. In European Conference on Object-Oriented Programming, 2010. Google Scholar
Digital Library
- D. Hedin and A. Sabelfeld. Information-Flow Security Control for JavaScript. In IEEE Computer Security Foundations Symposium, 2012. Google Scholar
Digital Library
- P. Heidegger and P. Thiemann. Recency types for dynamically-typed, object based languages: Strong updates for JavaScript. In ACM SIGPLAN International Workshop on Foundations of Object-Oriented Languages, 2009.Google Scholar
- A. Igarashi, B. C. Pierce, and P. Wadler. Featherweight Java: A minimal core calculus for Java and GJ. ACM Transactions on Programming Languages and Systems, 23 (3), 2001. Google Scholar
Digital Library
- S. Maffeis, J. Mitchell, and A. Taly. An Operational Semantics for JavaScript. In ASIAN Symposium on Programming Languages and Systems, pages 307--325, 2008. Google Scholar
Digital Library
- M. S. Miller. The Kernel-E Language Reference Manual. URL http://www.erights.org/elang/elangmanual.pdf.Google Scholar
- PLT. The Racket Guide. URL http://docs.racket-lang.org/guide/eval.html.Google Scholar
- C. Queinnec. Macroexpansion Reflective Tower. In Reflection, 1996.Google Scholar
- A. Taly, Ú. Erlingsson, J. C. Mitchell, M. S. Miller, and J. Nagra. Automated Analysis of Security-Critical JavaScript APIs. In IEEE Symposium on Security and Privacy, 2012. Google Scholar
Digital Library
- M. Wand and D. P. Friedman. The Mystery of the Tower Revealed: A Non-Reflective Description of the Reflective Tower. In LISP and Functional Programming, 1986. Google Scholar
Digital Library
- D. Yu, A. Chander, N. Islam, and I. Serikov. JavaScript Instrumentation for Browser Security. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2007. Google Scholar
Digital Library
Index Terms
A tested semantics for getters, setters, and eval in JavaScript
Recommendations
A tested semantics for getters, setters, and eval in JavaScript
DLS '12: Proceedings of the 8th symposium on Dynamic languagesWe present S5, a semantics for the strict mode of the ECMAScript 5.1 (JavaScript) programming language. S5 shrinks the large source language into a manageable core through an implemented transformation. The resulting specification has been tested ...
From bytecode to JavaScript: the Js_of_ocaml compiler
We present the design and implementation of a compiler from OCaml bytecode to JavaScript. The compiler first translates the bytecode into a static single-assignment intermediate representation on which optimizations are performed, before generating ...
JavaScript as an embedded DSL
ECOOP'12: Proceedings of the 26th European conference on Object-Oriented ProgrammingDeveloping rich web applications requires mastering different environments on the client and server sides. While there is considerable choice on the server-side, the client-side is tied to JavaScript, which poses substantial software engineering ...







Comments