Modularisation of state-dependent crosscutting concerns using TinySAOP

In aspect-oriented programming (AOP), to specify its intention clearly, a pointcut definition must specify the join point where to adapt a crosscutting functionality, as well as the applicability condition of the crosscutting functionality (if any). Meanwhile, to realise modular abstraction of a crosscutting functionality, an advice must contain the crosscutting functionality only. A state-dependent crosscutting concern is an aspect whose applicability of its advice at a matched join point is state-dependent, and call graph-based AOP approaches are insufficient for a state-dependent crosscutting concern because they do not allow specification of the state-dependent applicability condition in the pointcut definition. Thus, the state-dependent applicability condition has to be embedded inside the aspect's advice, and as a result, the intention of the pointcut definition is not clearly defined and the modularity of the advice is broken. To solve the state-dependent crosscutting concern problem, the paper discusses TinySAOP language that exposes applicability join point and supports in pointcut to allow the applicability condition of a state-dependent crosscutting concern to be clearly specified in the pointcut definition and cleanly separated from the aspect's advice.