Skip directly to: content | search

ExCAPE: Expeditions in Computer Augmented Program Engineering

Dynamic and Interactive Synthesis of Code Snippets

PIs: Bodik (Berkeley) and Hartmann (Berkeley)

The overarching goal of ExCAPE is to advance the way programmers write code by leveraging advances in software synthesis. The CodeHint project demonstrates a particular approach for embedding synthesis into a programmer’s daily workflow in a standard IDE. The key research question, as it pertains to design methodology, is how to ensure that programmers can easily write specifications of desired code. Formal specifications have shown to be hard and unnatural in part because the programmer may not know the names of relevant classes, which are needed in the specification. In this work, we improve on the expressiveness of specifications of previous synthesizers. Our key idea is making synthesis dynamic. By searching for the correct code at runtime, we enable specifications that are simple assertions over concrete program state, such as “synthesize code that produces an object with a field whose value is a string that contains the string ‘hello’ ”. Notice that neither the type of the object nor the name of its field need to be named. Our implementation, which we call CodeHint, generates and evaluates code at runtime and hence can synthesize realworld Java code that involves I/O, reflection, native calls, and other advanced language features. Our CodeHint design tool implementation was written as a plug-in to the common Eclipse development environment to demonstrate its applicability to today’s software engineering workflows. We have evaluated CodeHint in two user studies and have shown that its algorithms are efficient and that it significantly improves programmer productivity [GRBGS14].



Papers:

ExCAPE: Expeditions in Computer Augmented Program Engineering NSF National Science Foundation Award CCF-1138996