Semantics of static pointcuts in AspectJ

被引:7
|
作者
Avgustinov, Pavel [1 ]
Hajiyev, Elnar [1 ]
Ongkingco, Neil [1 ]
De Moor, Oege [1 ]
Sereni, Damien [1 ]
Tibble, Julian [1 ]
Verbaere, Mathieu [1 ]
机构
[1] Univ Oxford, Comp Lab, Programming Tools Grp, Oxford OX1 3QD, England
基金
英国工程与自然科学研究理事会;
关键词
design; experimentation; languages; aspect-oriented programming; pointcuts; logic programming; Datalog; term rewriting;
D O I
10.1145/1190215.1190221
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:11 / 23
页数:13
相关论文
共 50 条
  • [21] EXECUTABLE SPECIFICATION OF STATIC SEMANTICS
    DESPEYROUX, T
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1984, 173 : 215 - 233
  • [22] METHODS FOR SPECIFYING STATIC SEMANTICS
    WILLIAMS, MH
    [J]. COMPUTER LANGUAGES, 1981, 6 (01): : 1 - 17
  • [23] Static and dynamic semantics of the web
    Frye, C
    Plusch, M
    Lieberman, H
    [J]. SPINNING THE SEMANTIC WEB: BRINGING THE WORLD WIDE WEB TO ITS FULL POTENTIAL, 2003, : 377 - 401
  • [24] Partial evaluation of pointcuts
    Klose, Karl
    Ostermann, Klaus
    Leuschel, Michael
    [J]. PRACTICAL ASPECTS OF DECLARATIVE LANGUAGES, 2007, 4354 : 320 - +
  • [25] Pointcuts as functional queries
    Eichberg, M
    Mezini, M
    Ostermann, K
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2004, 3302 : 366 - 381
  • [26] How AspectJ is Used: An Analysis of Eleven AspectJ Programs
    Apel, Sven
    [J]. JOURNAL OF OBJECT TECHNOLOGY, 2010, 9 (01): : 117 - 142
  • [27] Optimising AspectJ
    Avgustinov, P
    Christensen, AS
    Hendren, L
    Kuzins, S
    Lhoták, J
    Lhoták, O
    de Moor, O
    Sereni, D
    Sittampalam, G
    Tibble, J
    [J]. ACM SIGPLAN NOTICES, 2005, 40 (06) : 117 - 128
  • [28] Use case level pointcuts
    Sillito, J
    Dutchyn, C
    Eisenberg, AD
    De Volder, K
    [J]. ECOOP 2004 - OBJECT-ORIENTED PROGRAMMING, 2004, 3086 : 244 - 266
  • [29] Static and Dynamic Semantics of NoSQL Languages
    Benzaken, Veronique
    Castagna, Giuseppe
    Nguyen, Kim
    Simeon, Jerome
    [J]. ACM SIGPLAN NOTICES, 2013, 48 (01) : 101 - 113
  • [30] EFFICIENT EXECUTION OF PROGRAMS WITH STATIC SEMANTICS
    BECKER, G
    MURRAY, NV
    [J]. SIGPLAN NOTICES, 1995, 30 (04): : 51 - 60