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 条
  • [1] Semantics of Static Pointcuts in AspectJ
    Avgustinov, Pavel
    Hajiyev, Elnar
    Ongkingco, Neil
    de Moor, Oege
    Sereni, Damien
    Tibble, Julian
    Verbaere, Mathieu
    [J]. CONFERENCE RECORD OF POPL 2007: THE 34TH ACM SIGPLAN SIGACT SYMPOSIUM ON PRINCIPLES OF PROGAMMING LANGUAGES, 2007, : 11 - 23
  • [2] Formalizing AspectJ weaving for static pointcuts
    Belblidia, Nadia
    Debbabi, Mourad
    [J]. SEFM 2006: FOURTH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING AND FORMAL METHODS, PROCEEDINGS, 2006, : 50 - +
  • [3] Specifying pointcuts in AspectJ
    Wang, Yi
    Zhao, Jianjun
    [J]. COMPSAC 2007: THE THIRTY-FIRST ANNUAL INTERNATIONAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE, VOL II, PROCEEDINGS, 2007, : 5 - +
  • [4] A candidate fault model for AspectJ pointcuts
    Baekken, Jon S.
    Alexander, Roger T.
    [J]. ISSRE 2006:17TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING, PROCEEDINGS, 2006, : 169 - +
  • [5] New AspectJ Pointcuts for Integer Overflow and Underflow Detection
    Alhadidi, D.
    Debbabi, M.
    Bhattacharya, P.
    [J]. INFORMATION SECURITY JOURNAL, 2008, 17 (5-6): : 278 - 287
  • [6] A Semantics of Poincuts in AspectJ
    Xie, Gang
    Yang, Bo
    Zhang, Mingyi
    [J]. 2013 INTERNATIONAL CONFERENCE ON ELECTRONIC ENGINEERING AND COMPUTER SCIENCE (EECS 2013), 2013, 4 : 323 - 330
  • [7] Improving the quality of AspectJ application: Translating name-based pointcuts to analysis-based pointcuts
    Wang, Lin
    Aotani, Tomoyuki
    Suzuki, Masato
    [J]. 2014 14TH INTERNATIONAL CONFERENCE ON QUALITY SOFTWARE (QSIC 2014), 2014, : 27 - 36
  • [8] On to Formal Semantics for Path Expression Pointcuts
    Al-Mansari, Mohammed
    Hanenberg, Stefan
    Unland, Rainer
    [J]. APPLIED COMPUTING 2008, VOLS 1-3, 2008, : 271 - 275
  • [9] Towards a formal semantics for AspectJ weaving
    Belblidia, Nadia
    Debbabi, Mourad
    [J]. MODULAR PROGRAMMING LANGUAGES, PROCEEDINGS, 2006, 4228 : 155 - 171
  • [10] Towards a formal semantics for AspectJ weaving
    Computer Security Laboratory , Concordia Institute for Information Systems Engineering, Concordia University, Montreal, Que. H3G IMS, Canada
    [J]. dpunkt Verlag; Microsoft Research; Robinson Associates; Sun Microsystems, 1600, 155-171 (2006):