Natural language is a programming language
Channel: ETAPS 2017
Date: 2017-05-09

Invited talk, given by Michael Ernst (University of Washington, USA).

A powerful, but limited, way to view software is as source code alone. Treating a program as a sequence of instructions enables it to be formalized and makes it amenable to mathematical techniques such as abstract interpretation and model checking. This is a limited way to view a program, because a program consists of much more than a sequence of instructions. Developers make use of test cases, documentation, variable names, program structure, the version control repository, and more. I argue that it is time to take the blinders off of software analysis tools: tools should use all these artifacts to deduce more powerful and useful information about the program.

Researchers are beginning to make progress towards this vision. This paper gives, as examples, four results that find bugs and generate code by applying Natural Language Processing to English that appears in or with source code.

- Comparing observed error messages to text in the user manual to determine whether the error message is adequate.
- Using dictionary similarity among variable names to discover when variables are used incorrectly.
- Creating test oracles (assert statements) from English descriptions of behavior (Javadoc documentation).
- Translating user queries into executable bash commands.

The four techniques use four different NLP techniques: document similarity, word semantics, parse trees, and neural networks. Initial results suggest that by paying attention to these rich sources of information, we can produce better software analysis tools and make programmers more productive. Many more opportunities exist, and I urge the community to grasp them.

This is joint work with Arianna Blasi, Juan Caballero, Sergio Delgado Castellanos, Alberto Goffi, Alessandra Gorla, Victoria Lin, Deric Pang, Mauro Pezzè, Irfan Ul Haq, Kevin Vu, Luke Zettlemoyer, and Sai Zhang.