Debugging Aspect-Enabled Programs

The ability to debug programs composed using aspect-oriented programming (AOP) techniques is critical to the adoption of AOP. Nevertheless, many AOP systems lack adequate support for debugging, making it difficult to diagnose faults and understand the pro

  • PDF / 451,099 Bytes
  • 16 Pages / 430 x 660 pts Page_size
  • 50 Downloads / 208 Views

DOWNLOAD

REPORT


Department of Computer Science Columbia University New York, NY 10027 {eaddy,aho}@cs.columbia.edu 2 Microsoft Corporation One Microsoft Way Redmond, WA 98052 {weipingh,paddymcd,julianbu}@microsoft.com

Abstract. The ability to debug programs composed using aspect-oriented programming (AOP) techniques is critical to the adoption of AOP. Nevertheless, many AOP systems lack adequate support for debugging, making it difficult to diagnose faults and understand the program’s composition and control flow. We present an AOP debug model that characterizes AOP-specific program composition techniques and AOP-specific program behaviors, and relates them to the AOP-specific faults they induce. We specify debugging criteria that we feel all AOP systems should support and compare how several AOP systems measure up to this ideal. We explain why AOP composition techniques, particularly dynamic and binary weaving, hinder source-level debugging, and how results from related research on debugging optimized code help solve the problem. We also present Wicca, the first dynamic AOP system to support full source-level debugging. We demonstrate how Wicca’s powerful interactive debugging features allow a programmer to quickly diagnose faults in the base program behavior or AOP-specific behavior.

1 Introduction We use the term debuggability to mean the ability to diagnose faults in a software system, and to improve comprehension of a system, by monitoring the execution of the system. Many debugging techniques exist, including source-level debugging, printf-style debugging, assertions, tracing, logging, and runtime visualization. The ability to debug aspect-enabled programs is important for many reasons. The interaction of aspects with a system introduces new fault types and complicates fault resolution [2]. Programmers rely on debugging to diagnose these faults and perform post-mortem analyses. Debugging is also an important tool for program comprehension. Aspect functionality can drastically change the behavior and control flow of the base program, leading to unexpected behavior [2] and resulting in the same complexity that multi-threaded programs are notorious for. Debugging provides a way to demystify these intricacies and better understand the composed program. M. Lumpe and W. Vanderperren (Eds.): SC 2007, LNCS 4829, pp. 200–215, 2007. © Springer-Verlag Berlin Heidelberg 2007

Debugging Aspect-Enabled Programs

201

Aspect-oriented programming (AOP) [28] is still an emerging field with many different techniques for aspect specification, composition, and integration. Along with tool support, debugging support serves as an indicator of AOP maturity [17, 32]. Commercial software developers are hesitant to adopt aspect-oriented software development practices or ship AOP-enabled products that are difficult to debug and service [2, 17, 24, 25]. Debugging is no substitute for aspect visualization [17] and testing. Indeed they are complementary: aspect visualization provides the ability to predict aspect behavior; testing provides a process fo