| Home |
Research | Education | Honors | Publications |
Presentations | Activities | Personal |
In our research, we have proposed a solution, called SYDIT, to help programmers perform the consistent/systematic editing in multiple places by requiring them to provide two versions of a changed method as an example and pinpoint all the other methods in need of similar changes. The basic idea is to first derive a sequence of AST edits to describe the difference between the provided before- and after- version of the changed method. Then SYDIT generalizes the edits by extracting only relevant unchanged context from the changed method, abstracting the specific identifiers used, and recalculating the position for each edit with respect to the extracted context in order to create an abstract, context-aware edit script which may be applicable to methods containing different contexts or using different identifiers. For each target method pinpointed by programmers which they want to change similarly, SYDIT will automatically customize the abstract, general edit script by looking for a subtree in the target context which is corresponding to the extracted context and establishing identifier mappings between them.
Our preliminary experiments have shown that this approach is promising since we have really found systematic editing tasks in several open source projects' version control systems which have been fulfilled by programmers manually. Testing SYDIT with such systematic editing tasks, we have got some interesting results demonstrating that SYDIT can perform a good job and thus simplify programmers' life.
However, there is still a lot of space for improvement. First, AST edit generation algorithm is not always smart enough to derive the best edit script, which has the least number of edits. Second, it is still unknown what is the best way to model the relevant context for a given edit script. Although control dependence, data dependence and containment relations are worth trying, they may sometimes propose too much requirements for a target method to match or sometimes fail to tell all the essential parts of a story. A better trial may be to create a general edit script from several exemplar changed methods, instead of only one. But the challenge is how to integrate the information conveyed by different exemplar changed methods. Third, currently, SYDIT does not guarantee the correctness of its suggestion for a target method. In order to improve programmers confidence in its suggestion, we need to integrate it with automatic compilation and regression testing framework, and only propose those can be compiled completely and pass the same or even larger number of test cases. However, since sometimes update in one method may require collaborative updates in other parts, like clients of the method or new fields used in it, how to automatically make these collaborative updates is also very challenging.
CS395T - Memory Management
CS386L - Graduate Programming Languages
CS395 - Conference Course
CS380C - Compilers
EE382V - Software Evolution
CS395 - Conference Course
CS388L - Introduction to Mathematical Logic
CS395T - Network Protocol Design
CS395 - Conference Course
CS388H - Cryptography
CS398T - Supervised Teaching in Computer Science
ESL 388S - Oral Communication