27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Checking Contracts for AOP using XPIDRs<br />

Henrique Rebêlo, Ricardo Lima, Alexandre Mota, César Oliveria, and Márcio Ribeiro<br />

Federal University of Pernambuco<br />

Brazil<br />

{hemr,rmfl,acm,calo,mmr3}@cin.ufpe.br<br />

ABSTRACT<br />

Over the last years, several proposals have advocated that a notion of interface between the base code and aspect code is<br />

necessary for reasoning about aspect-oriented programming (AOP), and for overcoming pointcut fragility. However, existing<br />

work that are AOP based, have not shown how one can specify these interfaces to facilitate m odular reasoning and specify<br />

control effects, such when advice does not proceed.<br />

In this dem onstration, we show how our crosscut program ming interfaces with design rules, or XPIDRs allow m odular<br />

understanding and enforcement of control flow effects. The key idea behind our design methodology is to introduce a design<br />

phase for each crosscutting concern. Hence, a designer establishes a crosscutting de sign rule interface to decouple the base<br />

and the aspect design. Such a crosscutting design rule is based on the well-known crosscut programming interfaces (XPIs).<br />

The main difference is that we present XPIs with the notion of behavioral rules. W e also show that since our approach with<br />

XPIDRs do not require any new AOP construct; they can be adopted in a straightforward manner by the AOP community.<br />

Demonstration Overview<br />

This demonstration showcases the features and benefits of the XPIDRs through the figure editor system , which is the<br />

classical example used in several AOP papers. The current infrastructure for developing XPIDRs is also demonstrated. It<br />

requires the AJDT developm ent toolkit used by the Eclipse ID E. Hence, features like weavi ng and syntax highlighting are<br />

straightforward. In addition, there is an XPIDR library required to specify the design rul es of the base and aspect code. This<br />

library includes all the JML annotations along with specific ones used to specify the control flow effects of the program.<br />

Presenter Biography<br />

Henrique Rebêlo is one of the authors of the XPIDRs. He has extensive experience in separation of concerns and design by<br />

contract techniques. He co-develope d the aspect-oriented JML com piler known as ajm lc. This com piler uses AOP for<br />

enforcing JML contracts at runtime. He was a researcher in tern in 2010 at Microsoft Research working on program analysis<br />

and program verification. He has given talks on design by contract and AOP at prestigious venues like <strong>SEKE</strong>’11, FTFJP’11,<br />

SAVCBS’09, ICST’08, and SAC’08.<br />

Acknowledgments<br />

This work has been partially supported by FACEPE under grant No. IBPG-1664-1.03/08 for Henrique Rebêlo. Ricardo Lima<br />

is also supported by CNPq under grant No. 314539/2009-3.<br />

A-5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!