CRII: SHF: Towards the Construction of a Model for Natural Language and Source Code
Rochester Institute Of Tech, Rochester NY
Investigators
Abstract
Source code is written using a combination of human languages, such as English, and programming languages. Developers use a combination of the rules for human languages and programming languages to understand code. The act of trying to understand code is referred to as program comprehension; it is an activity that precedes all other programming-related activities a developer might undertake when coding. For example, before fixing a bug, a developer needs to understand the code where the bug is present; to add a new software feature, a developer must understand the code which will support the new feature. If a piece of code is highly comprehensible, then developers will have an easier time maintaining, debugging, and adding to it. To support comprehension, research must attempt to formally model how human language describes program behavior. With such a model, source code could be optimized to be maximally understandable by automatically improving, or generating, human language to best describe it. This project aims to build such a model by combining information from natural language part of speech with a model of program behavior to assist, improve and measure comprehension. This project aims to formally model how human language describes source code behavior. This will be achieved by combining a static-analysis-based taxonomy of identifier type categorizations with natural language techniques and identifier definition-use chains. The combination of these three activities allow the model to measure 1) how the type constrains the behavior of an identifier, 2) what role, in English, the words in an identifier correlate to, and 3) what function calls the identifier is used in. These will allow the model to understand how the English of an identifier relates to the usage (function calls) and behavior constraints (type constraints). The goal of this model is to formally measure the way human languages are used to describe source code behavior such that it could be used to train a machine to do the same. The completed model will increase the current understanding of how developers express program behavior through human languages and allow for this expression to be measurably optimized for increased comprehensibility. Additionally, the model will improve modern program comprehension techniques by allowing them to be more aware of how the underlying source code structure and rules influence the way human languages are used to describe program behavior. This award reflects NSF's statutory mission and has been deemed worthy of support through evaluation using the Foundation's intellectual merit and broader impacts review criteria.
View original record on NSF Award Search →