Unsound Program Analysis & Feedback-directed Test Generation

October 24, 2023

Two in-person research talks by Ellen Arteca and Alexi Turcotte (Northeastern & CISPA), which will happen back-to-back: "Feedback- and mined data- directed test generation for JavaScript" & "Optimisations via Unsound Program Analysis"

Time: October 24, 2023
Meeting mode: in presence
Venue: 2.013 (Fakultätssitzungssaal)
Universitätsstr. 38
Stuttgart

Download as iCal:

Talk #1: Feedback- and mined data- directed test generation for JavaScript

Test generation involves automatically exercising the functionality of a given software library. This is particularly challenging for JavaScript: as a dynamic language, there is minimal-to-no type information available for functions, and as if that is not bad enough functions rarely crash even if called with invalid arguments. JavaScript is also replete with libraries using asynchronous higher-order functions, which is a class of APIs that most test generation algorithms are unequipped to deal with.

In this talk, I will present a feedback-directed unit test generator for JavaScript that supports the testing of  APIs with asynchronously invoked callback arguments. The core of this test generator is a feedback-driven approach for concurrent test generation and API discovery, which is also seeded with example function calls mined from real code bases. We evaluated this over some JavaScript libraries both with and without asynchronous callback arguments, and found it to be effective in both code coverage and behavioural difference identification. We also make some actionable observations on the conditions under which each of the test generation features are most effective, from which we can infer some generalizations on the utility of mined program patterns.

Speaker: Ellen Arteca. Recently obtained a PhD at Northeastern University. Soon starting at Google. See https://emarteca.github.io/

Talk #2: Optimisations via Unsound Program Analysis

The laissez-faire semantics of languages like JavaScript and Python result in languages that are as easy to use as they are difficult to analyse statically. For instance, JavaScript programmers can access non-existent properties of objects and add new properties to objects at runtime; this makes simple analysis tasks like determining the properties of an object difficult for sound analysis. This is a shame, as sound static analysis typically underpins approaches to repair and optimise code, of which there is a pressing need in dynamic languages given how easy they are to (mis-)use.

In this talk, I will present an approach we developed to optimise database-backed JavaScript web applications using deliberately unsound analysis. Our approach leverages unsound data flow analysis to detect inefficiencies, and automatically generates a program transformation to optimise the code. Overall we found encouraging results, and applied our technique successfully to many open-source, client-side JavaScript applications. Beyond presenting our approach, I will discuss the pros and cons of using unsound analysis, how we mitigated the unsoundness of our approach, and future research directions.

Speaker: Alexi Turcotte. Post-doc at CISPA. See https://reallytg.github.io/

To the top of the page