10.07.2015 Views

Enhancing Source-Level Programming Tools with An Awareness of ...

Enhancing Source-Level Programming Tools with An Awareness of ...

Enhancing Source-Level Programming Tools with An Awareness of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

files [12]. The JDIFF [3] algorithm identifies changes betweentwo versions <strong>of</strong> an object-oriented program using anaugmented representation <strong>of</strong> a control-flow graph. M. Kimet al. [25] infer generalized structural changes at or abovethe level <strong>of</strong> a method header, represented as first-order relationallogic rules. These techniques could be leveraged togenerate SER scripts automatically by generalizing the differencesbetween the original and enhanced versions <strong>of</strong> multipleclasses.Our own Rosemari system [45] generalizes structural differencesbetween two versions <strong>of</strong> a representative example.Such examples are usually supplied by framework vendorsto guide the developers in upgrading their legacy applicationsfrom one framework version to another. Rosemari featuresa DSL for describing program transformations, but canbe retargeted to present structural changes in SER instead.5.4 Symbolic ExecutionThe idea <strong>of</strong> symbolic undo, used in implementing our debugger,is influenced by symbolic execution [26], which analyzesa program by executing it <strong>with</strong> symbolic inputs, but<strong>with</strong>out actually running it. By analogy, our symbolic undotechnique enables source level debugging <strong>of</strong> enhanced bytecodeby mapping it back, via symbolic operations, to its originalsource code, also <strong>with</strong>out affecting the program’s execution.6. Future WorkThe initial evaluation results <strong>of</strong> our approach have been positive.To demonstrate the effectiveness <strong>of</strong> our approach, wehave conducted two case studies. Specifically, we have augmentedtwo source-level programming tools <strong>with</strong> enhancement-awareness,so that the tools could handle programs thatuse four different bytecode enhancement strategies.As future work, we plan to conduct user studies to evaluatethe value <strong>of</strong> our approach for programmers <strong>with</strong> differentlevels <strong>of</strong> expertise. One such study could evaluate whether asymbolic undo debugger is more effective than a regular debuggerin helping the programmer to locate and fix bugs.<strong>An</strong>other study could evaluate the value <strong>of</strong> integrating the enhancementinformation <strong>with</strong> a programming editor.We plan to create a debugger for SER scripts. Althoughthe declarative nature <strong>of</strong> SER scripts makes it easier to ensuretheir correctness, bugs still can be introduced, particularlyif a SER script is developed by someone other than aframework developer. Having a SER debugger is likely toimprove the usability <strong>of</strong> our approach.We plan to extend our approach to programs that havebeen transparently enhanced more than once, possibly bydifferent enhancers. For example, the same application canuse multiple frameworks, each enhancing intermediate codein its own way.Bytecode enhancement could add functionality in languagesother than the host language, including query languagessuch as SQL or Datalog. Our approach would haveto be extended to add the enhancements-awareness to programmingtools handling multi-language applications.There could be potential benefit in synthesizing thesource code representation <strong>of</strong> bytecode-only enhancements.To that end, the SER interpreter would have to be integrated<strong>with</strong> a decompiler that is enhancements-aware. The success<strong>of</strong> this approach would mainly depend on the decompiler’sefficiency and precision.Generating SER scripts automatically will reduce theframework programmer’s effort and make our methodologymore appealing to the average programmer. A promising approachwould require generalizing program differencing, atarget <strong>of</strong> several recent research efforts [25].Finally, we would like to make our symbolic debuggeravailable as an Eclipse IDE plug-in.7. ConclusionsThis paper has argued about the value <strong>of</strong> enhancing sourcelevelprogramming tool <strong>with</strong> an awareness <strong>of</strong> transparentprogram transformations. To enable such awareness, wehave introduced SER, a declarative language that conciselydescribes structural enhancements. To validate our approach,we have augmented two existing source-level programmingtools <strong>with</strong> an awareness <strong>of</strong> bytecode enhancement. We havealso expressed in SER four enhancement strategies followedby different enhancers and used our augmented programmingtool to handle the enhanced programs. As part <strong>of</strong> enhancinga source level debugger, we have introduced a newdebugging architecture that makes it possible to calculatereverse-mapping instructions based on a SER specification.Bytecode enhancement has already entered the mainstream<strong>of</strong> enterprise s<strong>of</strong>tware development, and future enhancersare likely to transform programs in even more complexways. As a result, source code alone will become evenless sufficient in presenting a realistic picture about the functionality<strong>of</strong> a program. Our approach <strong>of</strong> making programmingtools aware <strong>of</strong> bytecode enhancements has the potentialto address this problem, and help programmers enjoythe benefits <strong>of</strong> transparent bytecode enhancement <strong>with</strong>outsuffering any <strong>of</strong> its disadvantages.AvailabilityAll the s<strong>of</strong>tware described in the paper is available from:http://research.cs.vt.edu/vtspaces/ser/.References[1] C. <strong>An</strong>dreae, J. Noble, S. Markstrum, and T. Millstein.A framework for implementing pluggable type systems.SIGPLAN Not., 41(10):57–74, 2006.[2] Apache Jakarta Project. The Byte Code Engineering Library.http://jakarta.apache.org/bcel/manual.html.Accepted to OOPSLA 2009 15 2009/5/14

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!