UBC Theses and Dissertations
Pointcuts by example McCormick, Edward J.
The thesis of this dissertation is that it is possible to construct IDE-based tools that allow the editing of AspectJ pointcut expressions through direct manipulation of effective representations of join points in the code to which a pointcut applies. There are two reasons why providing tool support for managing pointcut expressions is important. The first reason is that the pointcut-advice mechanism obscures exactly what a given piece of code does. This is because the execution of any piece of code may trigger additional advice of which the developer may be unaware. The second reason is that the creation and maintenance of pointcut expressions that capture the intended set of join points is a difficult task. Pointcut expressions are typically based on assumed naming and structural patterns in the code. We argue that without proper tool support, it is difficult for the developer to properly verify that the conventions are followed strictly enough for a pointcut to remain robust Current tool support addresses these issues to some extent by alerting the developer to where the local join points exist in the code, and the advice that applies at that point. However, if the developer finds that the join points are incorrect he must open the aspect and edit the pointcut expression outside the context of the code where the join point should exist. In this dissertation we present the notion of Pointcuts by Example. Using this technique, a developer is able to specify examples in the code of join points that a pointcut expression should or should-not match. As a constructive proof of existence, we developed prototype tool support for editing pointcuts by example called the Pointcut Wizard. The PW presents a GUI interface for editing pointcut expressions by selecting add or remove operations at join point shadow sites.
Item Citations and Data