Predicting Program Properties from "Big Code"

By Veselin Raychev, Martin T. Vechev, Andreas Krause. 2015

405 citations recorded by the source corpus.

We present a new approach for predicting program properties from massive codebases (aka "Big Code"). Our approach first learns a probabilistic model from existing data and then uses this model to predict properties of new, unseen programs. The key idea of our work is to transform the input program into a representation which allows us to phrase the problem of inferring program properties as structured prediction in machine learning. This formulation enables us to leverage powerful probabilistic graphical models such as conditional random fields (CRFs) in order to perform joint prediction of program properties. As an example of our approach, we built a scalable prediction engine called JSNice for solving two kinds of problems in the context of JavaScript: predicting (syntactic) names of identifiers and predicting (semantic) type annotations of variables. Experimentally, JSNice predicts correct names for 63% of name identifiers and its type annotation predictions are correct in 81% of the cases. In the first week since its release, JSNice was used by more than 30,000 developers and in only few months has become a popular tool in the JavaScript developer community. By formulating the problem of inferring program properties as structured prediction and showing how to perform both learning and inference in this context, our work opens up new possibilities for attacking a wide range of difficult problems in the context of "Big Code" including invariant generation, decompilation, synthesis and others.

Subfields: Information Systems, Software, Code Generation & Program Synthesis, Program Analysis & Verification, Signal Processing

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Information Systems

  1. Miltiadis Allamanis
  2. Charles Sutton
  3. Michael Pradel
  4. Uri Alon
  5. Eran Yahav
  6. Premkumar T. Devanbu
  7. Rishabh Singh
  8. Earl T. Barr

In Software

  1. Charles Sutton
  2. Miltiadis Allamanis
  3. Michael Pradel
  4. Premkumar T. Devanbu
  5. Rishabh Singh
  6. Koushik Sen
  7. Earl T. Barr
  8. Marc Brockschmidt

In Code Generation & Program Synthesis

  1. Charles Sutton
  2. Miltiadis Allamanis
  3. Michael Pradel
  4. Premkumar T. Devanbu
  5. Rishabh Singh
  6. Vincent J. Hellendoorn
  7. Rafael-Michael Karampatsis
  8. Swarat Chaudhuri

In Program Analysis & Verification

  1. Miltiadis Allamanis
  2. Charles Sutton
  3. Michael Pradel
  4. Premkumar T. Devanbu
  5. Marc Brockschmidt
  6. Earl T. Barr
  7. Georgios Gousios
  8. Rafael-Michael Karampatsis

In Signal Processing

  1. Miltiadis Allamanis
  2. Charles Sutton
  3. Michael Pradel
  4. Koushik Sen
  5. Eran Yahav
  6. Marc Brockschmidt
  7. Uri Alon
  8. Premkumar T. Devanbu

Citations in the corpus