Keyword Programming in Java Greg Little and Robert C. Miller MIT CSAIL This work was supported in part by the National Science Foundation under award number.

Slides:



Advertisements
Similar presentations
Answering Approximate Queries over Autonomous Web Databases Xiangfu Meng, Z. M. Ma, and Li Yan College of Information Science and Engineering, Northeastern.
Advertisements

LIS618 lecture 6 Thomas Krichel structure DIALOG –basic vs additional index –initial database file selection (files) Lexis/Nexis.
Automatic Timeline Generation from News Articles Josh Taylor and Jessica Jenkins.
Lecture 15: I/O and Parsing
Building Java Programs Chapter 14
Formal Language, chapter 4, slide 1Copyright © 2007 by Adam Webber Chapter Four: DFA Applications.
SCJP 6.0 Lecturer Kuo-Yi Chen 151, 153, 154, 155, 156, 157
Problem Solving 5 Using Java API for Searching and Sorting Applications ICS-201 Introduction to Computing II Semester 071.
Improved TF-IDF Ranker
MATLAB Examples. CS 1112 MATLAB Examples Find the number of positive numbers in a vector x = input( 'Enter a vector: ' ); count = 0; for ii = 1:length(x),
Conditional statements and Boolean expressions. The if-statement in Java (1) The if-statement is a conditional statement The statement is executed only.
University of Palestine software engineering department Introduction to data structures Introduction to java application instructor: Tasneem Darwish.
Arrays Liang, Chpt 5. arrays Fintan Array of chars For example, a String variable contains an array of characters: An array is a data structure.
Paper Title Your Name CMSC 838 Presentation. CMSC 838T – Presentation Motivation u Problem paper is trying to solve  Characteristics of problem  … u.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 28, 2005.
Query Rewriting for Extracting Data Behind HTML Forms Xueqi Chen, 1 David W. Embley 1 Stephen W. Liddle 2 1 Department of Computer Science 2 Rollins Center.
General Computer Science for Engineers CISC 106 Lecture 26 Dr. John Cavazos Computer and Information Sciences 04/24/2009.
A Fast Regular Expression Indexing Engine Junghoo “John” Cho (UCLA) Sridhar Rajagopalan (IBM)
A Web-based Intelligent Hybrid System for Fault Diagnosis Gunjan Jha Research Student Nanyang Technological University Singapore.
Query Rewriting for Extracting Data Behind HTML Forms Xueqi Chen Department of Computer Science Brigham Young University March 31, 2004 Funded by National.
Programming Concepts MIT - AITI. Variables l A variable is a name associated with a piece of data l Variables allow you to store and manipulate data in.
Impact Analysis of Database Schema Changes Andy Maule, Wolfgang Emmerich and David S. Rosenblum London Software Systems Dept. of Computer Science, University.
Interpreting the data: Parallel analysis with Sawzall LIN Wenbin 25 Mar 2014.
CIS Computer Programming Logic
1 PARSEWeb: A Programmer Assistant for Reusing Open Source Code on the Web Suresh Thummalapenta and Tao Xie Department of Computer Science North Carolina.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 A semantic approach for question classification using.
Introduction. 2COMPSCI Computer Science Fundamentals.
Michael Cafarella Alon HalevyNodira Khoussainova University of Washington Google, incUniversity of Washington Data Integration for Relational Web.
Sep 12, 2007Sprenkle - CS1111 Objectives Review  Linux  Why programming languages? Compiled vs. Interpreted Languages Programming in Python  Data types.
Exploring Online Social Activities for Adaptive Search Personalization CIKM’10 Advisor : Jia Ling, Koh Speaker : SHENG HONG, CHUNG.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
Introduction to Java Applications Part II. In this chapter you will learn:  Different data types( Primitive data types).  How to declare variables?
Arrays and ArrayLists in Java L. Kedigh. Array Characteristics List of values. A list of values where every member is of the same type. Each member in.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Chapter 8: Collections: Arrays. 2 Objectives One-Dimensional Arrays Array Initialization The Arrays Class: Searching and Sorting Arrays as Arguments The.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
CIS 260: App Dev I. 2 Programs and Programming n Program  A sequence of steps designed to accomplish a task n Program design  A detailed _____ for implementing.
1 Chapter 20 Lists, Stacks, Queues Lecture 7 Dr. Musab Zghoul برمجة هيكلية.
Evolutionary Art with Multiple Expression Programming By Quentin Freeman.
WIRED Week 3 Syllabus Update (next week) Readings Overview - Quick Review of Last Week’s IR Models (if time) - Evaluating IR Systems - Understanding Queries.
Alattin: Mining Alternative Patterns for Detecting Neglected Conditions Suresh Thummalapenta and Tao Xie Department of Computer Science North Carolina.
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
Discrete Structures and The Three-Fold Introduction to Computer Science Doug Baldwin Department of Computer Science SUNY Geneseo.
Querying Web Data – The WebQA Approach Author: Sunny K.S.Lam and M.Tamer Özsu CSI5311 Presentation Dongmei Jiang and Zhiping Duan.
Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
A Novel Visualization Model for Web Search Results Nguyen T, and Zhang J IEEE Transactions on Visualization and Computer Graphics PAWS Meeting Presented.
Authors: Peter Cappello Damon Chastain Matthew Urtnowski Course:CECS 541 Instructor: Dr. Michael Hoffman Date:Fall 2010.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming strings.
Introduction to Java Applications Part II. In this chapter you will learn:  Different data types( Primitive data types).  How to declare variables?
Higher Computing Science 2016 Prelim Revision. Topics to revise Computational Constructs parameter passing (value and reference, formal and actual) sub-programs/routines,
COP 2551 Introduction to Object Oriented Programming with Java Topics –Introduction to the Java language –Code Commenting –Java Program Structure –Identifiers.
The Development of a search engine & Comparison according to algorithms Sung-soo Kim The final report.
Programming Constructs Notes Software Design & Development: Computational Constructs, Data Types & Structures, Algorithm Specification.
IP ROVIDENTIFY PREPARE PREPARE RESEARCH RESEARCHORGANIZEVALIDATE the info task to gather info within sources for info the info from all sources thesis.
Instance Discovery and Schema Matching With Applications to Biological Deep Web Data Integration Tantan Liu, Fan Wang, Gagan Agrawal {liut, wangfa,
Evaluating Translation Memory Software Francie Gow MA Translation, University of Ottawa Translator, Translation Bureau, Government of Canada
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
IAS 1313: OBJECT ORIENTED PROGRAMMING Week 3: Data Type, Control Structure and Array Prepared by: Mrs Sivabalan1.
Information Storage and Retrieval Fall Lecture 1: Introduction and History.
Chapter 2 Assignment and Interactive Input
Prepared by Rao Umar Anwar For Detail information Visit my blog:
SSEA Computer Science: CS106A
CSS161: Fundamentals of Computing
إستراتيجيات ونماذج التقويم
PHP.
The ‘while’ Statement September 27, 2006
Versatile workflow management Tool
CS246: Information Retrieval
Chapter 7 (continued) © 2011 Pearson Addison-Wesley. All rights reserved.
Presentation transcript:

Keyword Programming in Java Greg Little and Robert C. Miller MIT CSAIL This work was supported in part by the National Science Foundation under award number IIS , and by Quanta Computer as part of the TParty project.

Keyword Programming

Problem src read a line from src, and add it to array array cursor

AutoComplete read a line from src, and add it to array

AutoComplete read a line from src, and add it to array

read a line from src, and add it to array AutoComplete

read a line from src, and add it to array

AutoComplete read a line from src, and add it to array

read a line from src, and add it to array AutoComplete

read a line from src, and add it to array AutoComplete

read a line from src, and add it to array

Keyword Programming read a line from src, and add it to array

Keyword Programming read a line from src, and add it to array

Keyword Programming read a line from src, and add it to array

Keyword Programming read a line from src, and add it to array

Keyword Programming read a line from src, and add it to array

Related Work AutoComplete syntactically valid prefix Jungloids [Mandelin et al PLDI ’05] XSnippet [Sahavechaphan et al OOPSLA ’06] input and output types Keyword Programming keywords from expression

Motivation

Overview Algorithm Evaluation

Algorithm array.add(src.readLine());

array.add(src.readLine); array readLine src Algorithm

array.add(src.readLine); array readLine src Algorithm BufferedReader StringList

array List readLine String BufferedReader src BufferedReader add boolean List, String Algorithm

array List readLine String BufferedReader src BufferedReader add boolean List, String Algorithm Function

Algorithm Function Database Dynamic Program Extract Tree

Function Database array List

Function Database array List add boolean List, String

Function Database array List add boolean List, String src BufferedReader

List Functions array List add boolean List, String src BufferedReader readLine String BufferedReader

Function Database array List add boolean List, String src BufferedReader readLine String BufferedReader new String String

Score Functions array List add boolean List, String src BufferedReader readLine String BufferedReader new String String

Score Functions array List add boolean List, String src BufferedReader readLine String BufferedReader new String String add line

1 Score Functions array List add boolean List, String src BufferedReader readLine String BufferedReader new String String add line

Score Functions array List add boolean List, String src BufferedReader readLine String BufferedReader new String String add line 11

Dynamic Program List BufferedReaderString List booleanBufferedReaderString List booleanBufferedReaderString add List, String srcreadLine BufferedReader arrayadd List, String readLine BufferedReader array boolean array src new String src ? array List add boolean List, String src BufferedReader readLine String BufferedReader new String String 11 add List, String

Extract Tree List BufferedReaderString List booleanBufferedReaderString List booleanBufferedReaderString add List, String srcreadLine BufferedReader arrayadd List, String readLine BufferedReader array src new String src 1 2

Extract Tree List BufferedReaderString List booleanBufferedReaderString List booleanBufferedReaderString add List, String srcreadLine BufferedReader arrayadd List, String readLine BufferedReader array src new String src 1 2

Extract Tree List BufferedReaderString List booleanBufferedReaderString List booleanBufferedReaderString add List, String srcreadLine BufferedReader arrayadd List, String readLine BufferedReader array src new String src 1 2

Extract Tree List BufferedReaderString List booleanBufferedReaderString List booleanBufferedReaderString add List, String srcreadLine BufferedReader arrayadd List, String readLine BufferedReader array src new String src 1 2

Extract Tree BufferedReader add List, String arrayreadLine BufferedReader src List String boolean

Render as Java BufferedReader add List, String arrayreadLine BufferedReader src List String boolean array.add(src.readLine())

More Complex.Math.max(x, y) Keep best n functions per box max x y..Math.max(x, x) Discourage double counting

Artificial Corpus sense of speed in real projects sense of accuracy in wide variety of contexts User Study sense of accuracy on real inputs sense for how real inputs look Evaluation

Artificial Corpus Azureus340 kloc Buddi28 kloc CAROL18 kloc Dnsjava17 kloc Jakarta CC10 kloc jEdit125 kloc jMemorize15 kloc Jmol88 kloc JRuby72 kloc Radeox71 kloc RSSOwl71 kloc Sphinx67 kloc TV-Browser120 kloc Zimbra256 kloc multiple open source repositories Popular Could Compile

Artificial Corpus Azureus340 kloc Buddi28 kloc CAROL18 kloc Dnsjava17 kloc Jakarta CC10 kloc jEdit125 kloc jMemorize15 kloc Jmol88 kloc JRuby72 kloc Radeox71 kloc RSSOwl71 kloc Sphinx67 kloc TV-Browser120 kloc Zimbra256 kloc

Artificial Corpus RubySymbol.newSymbol(getRuntime(), name)

Artificial Corpus RubySymbol.newSymbol(getRuntime(), name) RubySymbol newSymbol getRuntime name

Artificial Corpus RubySymbol.newSymbol(getRuntime(), name) RubySymbol newSymbol getRuntime name

Artificial Corpus RubySymbol.newSymbol(getRuntime(), name) RubySymbol newSymbol getRuntime name ruby symbol new symbol get runtime name

Artificial Corpus RubySymbol.newSymbol(getRuntime(), name) RubySymbol newSymbol getRuntime name ruby symbol new symbol get runtime name name runtime get symbol symbol ruby new

Artificial Corpus RubySymbol.newSymbol(getRuntime(), name) name runtime get symbol symbol ruby new

Artificial Corpus RubySymbol.newSymbol(getRuntime(), name) name runtime get symbol symbol ruby new Algorithm

Artificial Corpus RubySymbol.newSymbol(getRuntime(), name) Algorithm name runtime get symbol symbol ruby new

Artificial Corpus RubySymbol.newSymbol(getRuntime(), name) Algorithm Record: - match? - how long? - how many keywords? Record: - match? - how long? - how many keywords? name runtime get symbol symbol ruby new

Results overall 91%

Results under 500ms

Results

User Study solicited experienced Java programmers (from college mailing lists) motivated with money —chance to win $20 web based study good data for 49 participants ages: about 70% students 3 females

User Study

Results Algorithm as-is CorrectIncorrect vowels.indexOf(c)vowels.index(c) vowels.isIn(c) index of c in vowelscheck vowels for c, return neg -1 if c is in vowels vowels search csearch vowels.charAt(c) vowels.indexOf(c,Integer.SIZE)) c

Results Algorithm as-is

Results javakey/pseudo usingas-is using algorithm

Results javakey/pseudo usingas-is53% using algorithm71%53%

Future Work print name of f Integer.valueOf(f.getName()) System.out.print(f.getName()) a priori word weights becomes want of f name print f name

Future Work println f name System.err.println(f.getName()) System.out.println(f.getName()) a priori function weights becomes want println f name println f name

Future Work synonyms lowercase toLowerCase add vs append spell correction

Conclusion array.add(src.readLine());

Backup Slides 70