Defusing the Debugging Scandal - Dedicated Debugging Technologies for Advanced Dispatching Languages

Haihan Yin

    Research output: ThesisPhD Thesis - Research UT, graduation UT

    188 Downloads (Pure)

    Abstract

    To increase program modularity, new programming paradigms, such as aspect-oriented programming, context-oriented programming, and predicated dispatching, have been researched in recent years. The new-paradigm languages allow changing behavior according to various kinds of contexts at the call sites. A recent statistics shows that at least 66\% of skilled engineers world-wide, courses and third party vendors are using languages that support AOP features. Many well-known companies are using these languages in product developments. In our research, we classified these new languages as advanced-dispatching languages. Advanced-dispatching languages are usually implemented as an extension of main-stream languages. After compilation, their programs are transformed to the compiled form of the main-stream language. Due to this compilation mechanism, the information, especially features that are specific to the advanced-dispatching languages, existing in the source code cannot be fully restored during debugging. The information loss increases the effort of comprehending advanced-dispatching programs and fixing advanced-dispatching-specific defects. In this thesis, we performed four works to improve the comprehensibility of debugging information from three debugging techniques --- interactive debugging, trace-based debugging, and slicing. We first performed research on the most common debugging technique---interactive debugging. Due to the availability of existing fault models, we proposed a generalized fault model based on four aspect-oriented-specific fault models. The generalized fault model consists of seven fault types and we found a likely pattern for fixing a defect corresponding to each type. Then, we analysed the pattern description and extracted eleven atomic advanced-dispatching-specific debugging tasks. To support the tasks, we modified an existing compiler to keep aspect-oriented information after the compilation, built a dedicated advanced dispatching debugging model, and implemented graphical user interfaces. In addition to the form of debugging information, we analysed the problem where and when the program should be suspended. In interactive debugging, breakpoints are essential to determine the suspending places. For fixing a specific defect, breakpoints are logically related. However, existing debuggers do not support to build logic between breakpoints. Therefore, programmers have to manually perform some repeated tasks. In this thesis, we analysed five common debugging scenarios that require multiple breakpoints. Targeting the investigated scenarios, we designed and implemented a breakpoint language that uses pointcuts to select suspension times in the program. In our language, an expected suspension can be expressively programmed and reached with less or even no irrelevant suspensions. Though the interactive debugging is the most commonly used debugging technique, it becomes handicapped in cases that the observed failure is far away from the defect. Locating the defect is typically a backtracking process through the execution history. However, interactive debugging is performed along with the program execution and cannot restore a past state. Trace-based debugger records events at runtime and supports inspection offline. Existing researches on trace-based debugging for advanced-dispatching languages are limited. We proposed a dedicated trace-based debugger with an user interface that allow programmers to navigate and query the recorded trace. Automation is what software aims for. Slicing is a debugging technique which automatically selects program statements that can influence the failure. It is performed on dependency graphs that contain the inter-relationships between program statements, such as control dependencies, call dependencies. We discussed how three aspect-oriented-specific constructs, which are join point shadows, program compositions, and non-argument context values, can influence the execution of aspect-oriented programs. Considering the three constructs, we developed dependency graphs that are dedicated to aspect-oriented programs, as well as a slicing algorithm that is performed on the developed dependency graphs. We showed that our approach can be applied efficiently for small projects and is able to select all relevant source code. The three debugging techniques analysed in this thesis fully cover phases before, during and after the program execution. For each technique, we have provided a debugging model that explicitly models advanced-dispatching concepts. The generated debugging information is in terms of advanced-dispatching abstractions. Thus, the comprehensibility of debugging advanced-dispatching programs is increased.
    Original languageUndefined
    Awarding Institution
    • University of Twente
    Supervisors/Advisors
    • Akşit, Mehmet, Supervisor
    • Bockisch, Christoph, Advisor
    Award date4 Dec 2013
    Place of PublicationEnschede
    Publisher
    Print ISBNs978-90-365-3569-4
    DOIs
    Publication statusPublished - 4 Dec 2013

    Keywords

    • IR-87913
    • METIS-298995
    • Dispatching Languages
    • Debugging
    • EWI-24606

    Cite this