Semantics of static pointcuts in aspectJ

Pavel Avgustinov, Elnar Hajiyev, Neil Ongkingco, Oege de Moor, Damien Sereni, Julian Tibble, Mathieu Verbaere
2007 SIGPLAN notices  
In aspect-oriented programming, one can intercept events by writing patterns called pointcuts. The pointcut language of the most popular aspect-oriented programming language, AspectJ, allows the expression of highly complex properties of the static program structure. We present the first rigorous semantics of the AspectJ pointcut language, by translating static patterns into safe (i.e. rangerestricted and stratified) Datalog queries. Safe Datalog is a logic language like Prolog, but it does not
more » ... have data structures; consequently it has a straightforward least fixpoint semantics and all queries terminate. The translation from pointcuts to safe Datalog consists of a set of simple conditional rewrite rules, implemented using the Stratego system. The resulting queries are themselves executable with the CodeQuest system. We present experiments indicating that direct execution of our semantics is not prohibitively expensive.
doi:10.1145/1190215.1190221 fatcat:5qrjwelod5a3vi7od3lw57di5q