Skip to main navigation Skip to search Skip to main content

Dynamic Flow Analysis for JavaScript

    • Albert-Ludwigs-Universität Freiburg

    Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

    Abstract

    Static flow analyses compute a safe approximation of a program’s dataflow without executing it. Dynamic flow analyses compute a similar safe approximation by running the program on test data such that it achieves sufficient coverage.

    We design and implement a dynamic flow analysis for JavaScript. Our formalization and implementation observe a program’s execution in a training run and generate flow constraints from the observations. We show that a solution of the constraints yields a safe approximation to the program’s dataflow if each path in every function is executed at least once in the training run. As a by-product, we can reconstruct types for JavaScript functions from the results of the flow analysis.

    Our implementation shows that dynamic flow analysis is feasible for JavaScript. While our formalization concentrates on a core language, the implementation covers full JavaScript. We evaluated the implementation using the SunSpider benchmark.
    Original languageEnglish
    Title of host publicationTrends in Functional Programming
    Chapter5
    Pages75-93
    Number of pages19
    Edition2016
    ISBN (Electronic)978-3-030-14805-8
    DOIs
    Publication statusPublished - 21 Feb 2019

    Publication series

    NameLecture Notes in Computer Science
    PublisherSpringer
    Volume17
    ISSN (Print)0302-9743
    ISSN (Electronic)1611-3349

    Keywords

    • Type inference
    • JavaScript
    • Flow analysis
    • Dynamic languages

    Fingerprint

    Dive into the research topics of 'Dynamic Flow Analysis for JavaScript'. Together they form a unique fingerprint.

    Cite this