CSAIL Publications and Digital Archive header
bullet Research Abstracts Home bullet CSAIL Digital Archive bullet Research Activities bullet CSAIL Home bullet

link to publications.csail.mit.edu link to www.csail.mit.edu horizontal line

 

Research Abstracts - 2007
horizontal line

horizontal line

vertical line
vertical line

Continuous Execution of Code in Chickenfoot

Robert Miller & Kevin Su

Motivation

The process of programming has constantly been evolving to give users more and more feedback. It started with giving feedback at runtime, using a batch model and an interpretive model. With the batch model, a user would write code and compile it to obtain an executable. The shortcoming of this approach was that it had a long feedback loop. The interpretive model allowed the user to execute individual sections of code, obtaining instantaneous feedback, but not necessarily ending up with an executable. Since then, some programming environments (such as Eclipse) have moved feedback into compile time (as the users type code), giving users syntax highlighting and allow type errors to be caught quickly. These improvements of feedback given to the user help contribute to overall debugging facilities.

This work seeks to further improve user feedback by creating a continuously executing environment, where the output of the program will be shown as the user types and navigates around the script. This takes advantage of the interpretive model, where the user can constantly see the code's output, and also results in a fully executable script. The benefit of this continuously executing environment is that it will provide a powerful debugging capability.


Figure 1: The script is executed as the user types.



Figure 2: As the user navigates backwards, the HTML page is updated to reflect that only part of
the script up to the cursor is being executed.
Approach

This continuously executing environment will be implemented as a part of [1] Chickenfoot, a Firefox browser plug-in. Chickenfoot is a JavaScript-based web-automation tool, which supplies the users with commands to customize and navigate web pages. This work will make it so that as the user develops in the Chickenfoot editor, all the code up to the location of the text cursor will be executed. In this way, as the user navigates a script, the corresponding HTML page will be updated as well. Because running even partial scripts may take a long time to run, this work will exploit the browser history to try to shortcut unnecessary parts of code, in order to speed up the overall process.

Current Work

Currently, I am developing a prototype of this continuous execution environment in Chickenfoot. One major problem is how to handle multi-line statements. If all the code up to the text cursor is run, it is possible that part of a multi-line statement will be executed. I am exploring the use of Rhino, a JavaScript parser to try to find an elegant solution to the problem caused by multi-line statements.

References

[1] Michael Bolin, Matthew Webber, Philip Rha, Tom Wilson, and Robert C. Miller. "Automation and Customization of Rendered Web Pages." UIST, 2005, pp. 163-172.

 

vertical line
vertical line
 
horizontal line

MIT logo Computer Science and Artificial Intelligence Laboratory (CSAIL)
The Stata Center, Building 32 - 32 Vassar Street - Cambridge, MA 02139 - USA
tel:+1-617-253-0073 - publications@csail.mit.edu