On the Naturalness of Software.
Natural languages like English are rich, complex, and powerful. The highly creative and graceful use of languages like English and Tamil, by masters like Shakespeare and Avvaiyar, can certainly delight and inspire. But in practice, given cognitive constraints and the exigencies of daily life, most h...
| Publicado en: | Communications of the ACM Vol. 59; no. 5; pp. 122 - 132 |
|---|---|
| Autores principales: | , , , , |
| Formato: | Artículo |
| Publicado: |
Association for Computing Machinery
May2016
|
| Materias: | |
| Acceso en línea: | Ver este registro en EBSCOhost |
| fields | @attributes: recordID: 1 pdfLink: plink: https://search.ebscohost.com/login.aspx?direct=true&db=hlh&AN=115178371&site=ehost-live header: @attributes: shortDbName: hlh uiTerm: 115178371 longDbName: Humanities International Complete uiTag: AN controlInfo: bkinfo: jinfo: jid: 00010782 ACM jtl: Communications of the ACM issn: 00010782 maglogo: N pubinfo: dt: May2016 vid: 59 iid: 5 pid: 68 pub: Association for Computing Machinery artinfo: ui: 115178371 10.1145/2902362 ppf: 122 ppct: 10 formats: tig: atl: On the Naturalness of Software. aug: au: Hindle, Abram Barr, Earl T. Gabel, Mark Zhendong Su Devanbu, Premkumar affil: Department of Computing Science, University of Alberta, Edmonton, Canada Department of Computer Science, University College London, United Kingdom Department of Computer Science, UC Davis, CA su: Natural languages Computer software Natural language processing Statistics Java programming language sug: subj: Natural languages Computer software Natural language processing Statistics Java programming language ab: Natural languages like English are rich, complex, and powerful. The highly creative and graceful use of languages like English and Tamil, by masters like Shakespeare and Avvaiyar, can certainly delight and inspire. But in practice, given cognitive constraints and the exigencies of daily life, most human utterances are far simpler and much more repetitive and predictable. In fact, these utterances can be very usefully modeled using modern statistical methods. This fact has led to the phenomenal success of statistical approaches to speech recognition, natural language translation, questionanswering, and text mining and comprehension. We begin with the conjecture that most software is also natural, in the sense that it is created by humans at work, with all the attendant constraints and limitations-and thus, like natural language, it is also likely to be repetitive and predictable. We then proceed to ask whether (a) code can be usefully modeled by statistical language models and (b) such models can be leveraged to support software engineers. Using the widely adopted n-gram model, we provide empirical evidence supportive of a positive answer to both these questions. We show that code is also very regular, and, in fact, even more so than natural languages. As an example use of the model, we have developed a simple code completion engine for Java that, despite its simplicity, already improves Eclipse's completion capability. We conclude the paper by laying out a vision for future research in this area. pubtype: Periodical doctype: Article src: R language: English refInfo: copyright: @attributes: flag: Y dt: @attributes: year: 2016 holdings: @attributes: islocal: N |
|---|