Skip to main content

The Essence of JavaScript

  • Conference paper
ECOOP 2010 – Object-Oriented Programming (ECOOP 2010)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6183))

Included in the following conference series:

Abstract

We reduce JavaScript to a core calculus structured as a small-step operational semantics. We present several peculiarities of the language and show that our calculus models them. We explicate the desugaring process that turns JavaScript programs into ones in the core. We demonstrate faithfulness to JavaScript using real-world test suites. Finally, we illustrate utility by defining a security property, implementing it as a type system on the core, and extending it to the full language.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abadi, M., Cardelli, L.: A Theory of Objects. Springer, Heidelberg (1996)

    MATH  Google Scholar 

  2. Anderson, C., Giannini, P., Drossopoulou, S.: Towards type inference for JavaScript. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 428–452. Springer, Heidelberg (2005)

    Google Scholar 

  3. Borning, A.: Classes versus prototypes in object-oriented languages. In: ACM Fall Joint Computer Conference (1986)

    Google Scholar 

  4. Chugh, R., Meister, J.A., Jhala, R., Lerner, S.: Staged information flow for JavaScript. In: ACM SIGPLAN Conference on Programming Language Design and Implementation (2009)

    Google Scholar 

  5. Crockford, D.: ADSafe, http://www.adsafe.org

  6. ECMAScript language specification (1999)

    Google Scholar 

  7. Facebook. FBJS, http://wiki.developers.facebook.com/index.php/FBJS

  8. Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. MIT Press, Cambridge (2009)

    MATH  Google Scholar 

  9. Guarnieri, S., Livshits, B.: GateKeeper: Mostly static enforcement of security and reliability policies for JavaScript code. In: USENIX Security Symposium (2009)

    Google Scholar 

  10. Guha, A., Krishnamurthi, S., Jim, T.: Static analysis for Ajax intrusion detection. In: International World Wide Web Conference (2009)

    Google Scholar 

  11. Heidegger, P., Thiemann, P.: 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 

  12. Herman, D.: ClassicJavaScript, http://www.ccs.neu.edu/home/dherman/javascript/

  13. Jensen, S.H., Møller, A., Thiemann, P.: Type analysis for JavaScript. In: International Static Analysis Symposium (2009)

    Google Scholar 

  14. Klein, C., Finder, R.B.: Randomized testing in PLT Redex. In: ACM SIGPLAN Workshop on Scheme and Functional Programming (2009)

    Google Scholar 

  15. Maffeis, S., Mitchell, J.C., Taly, A.: An operational semantics for JavaScript. In: Ramalingam, G. (ed.) APLAS 2008. LNCS, vol. 5356, pp. 307–325. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  16. Maffeis, S., Mitchell, J.C., Taly, A.: Isolating JavaScript with filters, rewriting, and wrappers. In: Backes, M., Ning, P. (eds.) ESORICS 2009. LNCS, vol. 5789, pp. 505–522. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  17. Miller, M.S., Samuel, M., Laurie, B., Awad, I., Stay, M.: Caja: Safe active content in sanitized JavaScript. Technical report, Google Inc. (2008), http://google-caja.googlecode.com/files/caja-spec-2008-06-07.pdf

  18. Tobin-Hochstadt, S., Felleisen, M.: The design and implementation of Typed Scheme. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2008)

    Google Scholar 

  19. Ungar, D., Smith, R.B.: SELF: The power of simplicity. In: ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications (1987)

    Google Scholar 

  20. Wright, A., Felleisen, M.: A syntactic approach to type soundness. Information and Computation 115(1) (1994)

    Google Scholar 

  21. Yu, D., Chander, A., Islam, N., Serikov, I.: Javascript instrumentation for browser security. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Guha, A., Saftoiu, C., Krishnamurthi, S. (2010). The Essence of JavaScript. In: D’Hondt, T. (eds) ECOOP 2010 – Object-Oriented Programming. ECOOP 2010. Lecture Notes in Computer Science, vol 6183. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14107-2_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-14107-2_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-14106-5

  • Online ISBN: 978-3-642-14107-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics