Semantics of static pointcuts in aspectJ

  • Authors:
  • Pavel Avgustinov;Elnar Hajiyev;Neil Ongkingco;Oege de Moor;Damien Sereni;Julian Tibble;Mathieu Verbaere

  • Affiliations:
  • Oxford University, Oxford, UK;Oxford University, Oxford, UK;Oxford University, Oxford, UK;Oxford University, Oxford, UK;Oxford University, Oxford, UK;Oxford University, Oxford, UK;Oxford University, Oxford, UK

  • Venue:
  • Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

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. range-restricted and stratified) Datalog queries. Safe Datalog is a logic language like Prolog, but it does not 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.