Skip to main content
Cornell University
We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate
arxiv logo > cs > arXiv:1608.07261v2

Help | Advanced Search

arXiv logo
Cornell University Logo

quick links

  • Login
  • Help Pages
  • About

Computer Science > Programming Languages

arXiv:1608.07261v2 (cs)
[Submitted on 25 Aug 2016 (v1), revised 12 Oct 2016 (this version, v2), latest version 18 Oct 2016 (v3)]

Title:Type Inference for Static Compilation of JavaScript (Extended Version)

Authors:Satish Chandra, Colin S. Gordon, Jean-Baptiste Jeannin, Cole Schlesinger, Manu Sridharan, Frank Tip, Young-Il Choi
Download a PDF of the paper titled Type Inference for Static Compilation of JavaScript (Extended Version), by Satish Chandra and 6 other authors
Download PDF
Abstract:We present a type system and inference algorithm for a rich subset of JavaScript equipped with objects, structural subtyping, prototype inheritance, and first-class methods. The type system supports abstract and recursive objects, and is expressive enough to accommodate several standard benchmarks with only minor workarounds. The invariants enforced by the types enable an ahead-of-time compiler to carry out optimizations typically beyond the reach of static compilers for dynamic languages. Unlike previous inference techniques for prototype inheritance, our algorithm uses a combination of lower and upper bound propagation to infer types and discover type errors in all code, including uninvoked functions. The inference is expressed in a simple constraint language, designed to leverage off-the-shelf fixed point solvers. We prove soundness for both the type system and inference algorithm. An experimental evaluation showed that the inference is powerful, handling the aforementioned benchmarks with no manual type annotation, and that the inferred types enable effective static compilation.
Comments: Extended version of OOPSLA 2016 paper of the same name
Subjects: Programming Languages (cs.PL)
Cite as: arXiv:1608.07261 [cs.PL]
  (or arXiv:1608.07261v2 [cs.PL] for this version)
  https://doi.org/10.48550/arXiv.1608.07261
arXiv-issued DOI via DataCite

Submission history

From: Colin Gordon [view email]
[v1] Thu, 25 Aug 2016 19:26:22 UTC (355 KB)
[v2] Wed, 12 Oct 2016 00:58:03 UTC (358 KB)
[v3] Tue, 18 Oct 2016 14:44:14 UTC (358 KB)
Full-text links:

Access Paper:

    Download a PDF of the paper titled Type Inference for Static Compilation of JavaScript (Extended Version), by Satish Chandra and 6 other authors
  • Download PDF
  • PostScript
  • Other Formats
(view license)
Current browse context:
cs.PL
< prev   |   next >
new | recent | 1608
Change to browse by:
cs

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar

DBLP - CS Bibliography

listing | bibtex
Satish Chandra
Colin S. Gordon
Jean-Baptiste Jeannin
Cole Schlesinger
Manu Sridharan
…
a export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
Connected Papers (What is Connected Papers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status
    Get status notifications via email or slack