Keyword programming in Java
Keyword programming is a novel technique for reducing the need to remember details of programming language syntax and APIs, by translating a small number of unordered keywords provided by the user into a valid expression. In a sense, the keywords act as a query that searches the space of expressions...
Main Authors: | , |
---|---|
Other Authors: | |
Format: | Article |
Language: | en_US |
Published: |
Springer Netherlands
2010
|
Online Access: | http://hdl.handle.net/1721.1/51686 https://orcid.org/0000-0002-0442-691X |
_version_ | 1826201476061462528 |
---|---|
author | Little, Danny Greg Miller, Robert C. |
author2 | Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory |
author_facet | Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory Little, Danny Greg Miller, Robert C. |
author_sort | Little, Danny Greg |
collection | MIT |
description | Keyword programming is a novel technique for reducing the need to remember details of programming language syntax and APIs, by translating a small number of unordered keywords provided by the user into a valid expression. In a sense, the keywords act as a query that searches the space of expressions that are valid in the given context. Prior work has demonstrated the feasibility and merit of this approach in limited domains. This paper explores the potential for employing this technique in much larger domains, specifically general-purpose programming languages like Java. We present an algorithm for translating keywords into Java method call expressions. When tested on keywords extracted from existing method calls in Java code, the algorithm can accurately reconstruct over 90% of the original expressions. We tested the algorithm on keywords provided by users in a web-based study. The results suggest that users can obtain correct Java code using keyword queries as accurately as they can write the correct Java code themselves. We implemented the algorithm in an Eclipse plug-in as an extension to the autocomplete mechanism and deployed it in a preliminary field study of several users, with mixed results. One interesting result of this work is that most of the information in Java method call expressions lies in the keywords, and details of punctuation and even parameter ordering can often be inferred automatically. |
first_indexed | 2024-09-23T11:52:22Z |
format | Article |
id | mit-1721.1/51686 |
institution | Massachusetts Institute of Technology |
language | en_US |
last_indexed | 2024-09-23T11:52:22Z |
publishDate | 2010 |
publisher | Springer Netherlands |
record_format | dspace |
spelling | mit-1721.1/516862022-10-01T06:36:51Z Keyword programming in Java Little, Danny Greg Miller, Robert C. Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology. Department of Electrical Engineering and Computer Science Miller, Robert C. Little, Danny Greg Miller, Robert C. Keyword programming is a novel technique for reducing the need to remember details of programming language syntax and APIs, by translating a small number of unordered keywords provided by the user into a valid expression. In a sense, the keywords act as a query that searches the space of expressions that are valid in the given context. Prior work has demonstrated the feasibility and merit of this approach in limited domains. This paper explores the potential for employing this technique in much larger domains, specifically general-purpose programming languages like Java. We present an algorithm for translating keywords into Java method call expressions. When tested on keywords extracted from existing method calls in Java code, the algorithm can accurately reconstruct over 90% of the original expressions. We tested the algorithm on keywords provided by users in a web-based study. The results suggest that users can obtain correct Java code using keyword queries as accurately as they can write the correct Java code themselves. We implemented the algorithm in an Eclipse plug-in as an extension to the autocomplete mechanism and deployed it in a preliminary field study of several users, with mixed results. One interesting result of this work is that most of the information in Java method call expressions lies in the keywords, and details of punctuation and even parameter ordering can often be inferred automatically. Quanta Computer - TParty project National Science Foundation 2010-02-10T19:46:35Z 2010-02-10T19:46:35Z 2008-10 2008-09 Article http://purl.org/eprint/type/SubmittedJournalArticle 1573-7535 0928-8910 http://hdl.handle.net/1721.1/51686 Little, Greg, and Robert Miller. “Keyword programming in Java.” Automated Software Engineering 16.1 (2009): 37-71. https://orcid.org/0000-0002-0442-691X en_US http://dx.doi.org/10.1007/s10515-008-0041-9 Automated Software Engineering Article is made available in accordance with the publisher's policy and may be subject to US copyright law. Please refer to the publisher's site for terms of use. application/pdf Springer Netherlands Amy Stout / webpage |
spellingShingle | Little, Danny Greg Miller, Robert C. Keyword programming in Java |
title | Keyword programming in Java |
title_full | Keyword programming in Java |
title_fullStr | Keyword programming in Java |
title_full_unstemmed | Keyword programming in Java |
title_short | Keyword programming in Java |
title_sort | keyword programming in java |
url | http://hdl.handle.net/1721.1/51686 https://orcid.org/0000-0002-0442-691X |
work_keys_str_mv | AT littledannygreg keywordprogramminginjava AT millerrobertc keywordprogramminginjava |