eclipse + harmonia: language-based tools for the programmer · susan l. graham, andrew begel, marat...

1
Susan L. Graham, Andrew Begel, Marat Boshernitsan Eclipse + Harmonia: Language-based Tools for the Programmer Supports C • C++ • Java • XML • Scheme • Common Lisp • Cobol • SRCL Harmonia: An extensible framework for interactive, language-aware programming tools Programming by Voice Interactive Transformations University of California, Berkeley Goal: Enable a programmer to compose, edit and navigate code in an editor using voice recognition. Harmonia Analysis Framework Harmonia Provides Language-Independent Analysis-based Tools to Programming Editors Structural Navigation OpenGL-based Parse Tree Visualization OpenGL-based Control Flow Graph Visualization Structurally-filtered Search C Preprocessing 4 for fore Homophones foo bar foo(bar) foo().bar Many Parses Semantic Errors While You Edit Programmers Say “Rename external variables to make their first six letters unique.” [Knuth, The errors of TeX] “Change BI_* macros to BYTE_*; similarly for bi_* local variables.” [Ben Wing, XEmacs ChangeLog] Goal: Enable the programmer to express operations on program source code at a level above traditional text-based editing. Programmers Now Do sed s/\([^.]*\)\.take_one(&\([^)]*\)) /\2 = \1.back();\n\1.pop_back()/g Programmers Should Do Online Interactive Parse Tree View Problems Speech recognizers don’t do Java Compilers can’t deal with ambiguities of natural language if args dot length equals two then file two load gets args sub one end if 1. User Speaks in Spoken Java if (args.length == 2) filetoload = args[1]; 2. Computer Translates to Java Benefits of Eclipse Platform for Harmonia Research Text Editor Framework Project and Resource Management Graphical User Interface 3 rd Party Tool Integration Existing Base of Potential Users Future Work Enabled by Eclipse Integrate Eclipse’s User Services with Harmonia’s Analyses Voice-Based Commenting Environment Harmonia Language Module Development Perspective Java/JNI/C Plugin Development Perspective XEmacs Integration Programming by Voice Eclipse Integration Interactive Transformations Versioned Syntax Tree EBNF Grammar Reflection XML Serialization of Program Edit History Ambiguous Lexing and Parsing Integration Libraries (C++, Java, Tcl, Lisp) Incremental GLR Parser Incremental Lexer Semantics Language Descriptions Harmonia + Eclipse Enables New Research in End-Programmer Tools

Upload: others

Post on 06-Nov-2019

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Eclipse + Harmonia: Language-based Tools for the Programmer · Susan L. Graham, Andrew Begel, Marat Boshernitsan Eclipse + Harmonia: Language-based Tools for the Programmer Supports

Susan L. Graham, Andrew Begel, Marat Boshernitsan

Eclipse + Harmonia:Language-based Tools for the Programmer

Supports C • C++ • Java • XML • Scheme • Common Lisp • Cobol • SRCL

Harmonia: An extensible framework for interactive, language-aware programming tools

Programming by Voice

Interactive Transformations

University of California, Berkeley

Goal: Enable a programmer to compose, edit and navigate code in an editor using voice recognition.

Harmonia Analysis Framework

Harmonia Provides Language-Independent Analysis-based Tools to Programming EditorsStructural NavigationOpenGL-based

Parse Tree VisualizationOpenGL-based Control Flow Graph Visualization

Structurally-filtered SearchC Preprocessing

4for

fore

Homophonesfoo barfoo(bar)foo().bar

Many Parses

Semantic Errors While You Edit

Programmers Say“Rename external variables to make their first six letters unique.” [Knuth, The errors of TeX]“Change BI_* macros to BYTE_*; similarly for bi_* local variables.” [Ben Wing, XEmacs ChangeLog]

Goal: Enable the programmer to expressoperations on program source code at a level above traditional text-based editing.

Programmers Now Dosed s/\([^.]*\)\.take_one(&\([^)]*\)) /\2 = \1.back();\n\1.pop_back()/g

Programmers Should Do

Online Interactive Parse Tree View

ProblemsSpeech recognizers don’t do JavaCompilers can’t deal with ambiguities of natural language

if args dot length equals two then file two load gets args sub one end if

1. User Speaks in Spoken Java

if (args.length == 2) filetoload = args[1];

2. Computer Translates to Java

Benefits of Eclipse Platformfor Harmonia ResearchText Editor FrameworkProject and Resource ManagementGraphical User Interface3rd Party Tool IntegrationExisting Base of Potential Users

Future Work Enabled by EclipseIntegrate Eclipse’s User Services with Harmonia’s Analyses

Voice-Based Commenting Environment

Harmonia Language Module Development Perspective

Java/JNI/C Plugin Development Perspective

XEmacs Integration

Programming by VoiceEclipse Integration

Interactive Transformations

Versioned Syntax Tree

EBNF GrammarReflection

XML Serialization ofProgram Edit History

Ambiguous Lexingand Parsing

Integration Libraries(C++, Java, Tcl, Lisp)

IncrementalGLR Parser

IncrementalLexer

Semantics

LanguageDescriptions

Harmonia + Eclipse Enables New Research in End-Programmer Tools