Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1739230.1739236acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

Execution levels for aspect-oriented programming

Published: 15 March 2010 Publication History

Abstract

In aspect-oriented programming languages, advice evaluation is usually considered as part of the base program evaluation. This is also the case for certain pointcuts, such as if pointcuts in AspectJ, or simply all pointcuts in higher-order aspect languages like AspectScheme. While viewing aspects as part of base level computation clearly distinguishes AOP from reflection, it also comes at a price: because aspects observe base level computation, evaluating pointcuts and advice at the base level can trigger infinite regression. To avoid these pitfalls, aspect languages propose ad-hoc mechanisms, which increase the complexity for programmers while being insufficient in many cases. After shedding light on the many facets of the issue, this paper proposes to clarify the situation by introducing levels of execution in the programming language, thereby allowing aspects to observe and run at specific, possibly different, levels. We adopt a defensive default that avoids infinite regression in all cases, and give advanced programmers the means to override this default using level shifting operators. We formalize the semantics of our proposal, and provide an implementation. This work recognizes that different aspects differ in their intended nature, and shows that structuring execution contexts helps tame the power of aspects and metaprogramming.

References

[1]
Jonathan Aldrich. Open modules: Modular reasoning about advice. In Andrew P. Black, editor, Proceedings of the 19th European Conference on Object-Oriented Programming (ECOOP 2005), number 3586 in Lecture Notes in Computer Science, pages 144--168, Glasgow, UK, July 2005. Springer-Verlag.
[2]
Eric Bodden, Florian Forster, and Friedrich Steimann. Avoiding infinite recursion with stratified aspects. In Proceedings of Net.ObjectDays 2006, Lecture Notes in Informatics, pages 49--54. GI-Edition, 2006.
[3]
Shigeru Chiba, Gregor Kiczales, and John Lamping. Avoiding confusion in metacircularity: The meta-helix. In Proceedings of the 2nd International Symposium on Object Technologies for Advanced Software (ISOTAS'96), volume 1049 of Lecture Notes in Computer Science, pages 157--172. Springer-Verlag, 1996.
[4]
Curtis Clifton and Gary T. Leavens. MiniMAO1: An imperative core language for studying aspect-oriented reasoning. Science of Computer Programming, 63:312--374, 2006.
[5]
Roberta Coelho, Awais Rashid, Alessandro Garcia, Nélio Cacho, Uirá Kulesza, Arndt Staa, and Carlos Lucena. Assessing the impact of aspects on exception flows: An exploratory study. In Jan Vitek, editor, Proceedings of the 22nd European Conference on Object-oriented Programming (ECOOP 2008), number 5142 in Lecture Notes in Computer Science, pages 207--234, Paphos, Cyprus, july 2008. Springer-Verlag.
[6]
Daniel S. Dantas, David Walker, Geoffrey Washburn, and Stephanie Weirich. AspectML: A polymorphic aspect-oriented functional programming language. ACM Transactions on Programming Languages and Systems, 30(3): Article No. 14, May 2008.
[7]
Olivier Danvy and Karoline Malmkjaer. Intensions and extensions in a reflective tower. In Proceedings of the 1988 ACM Conference on Lisp and Functional Programming, pages 327--341, Snowbird, Utah, USA, July 1988. ACM Press.
[8]
Marcus Denker, Mathieu Suen, and Stéphane Ducasse. The meta in meta-object architectures. In Proceedings of TOOLS Europe, Lecture Notes in Business and Information Processing, Zurich, Switzerland, July 2008. Springer-Verlag. To appear.
[9]
Jim des Rivières and Brian C. Smith. The implementation of procedurally reflective languages. In Proceedings of the Annual ACM Symposium on Lisp and Functional Programming, pages 331--347, August 1984.
[10]
Christopher Dutchyn. Dynamic Join Points: Model and Interactions. PhD thesis, University of British Columbia, Canada, November 2006.
[11]
Christopher Dutchyn, David B. Tucker, and Shriram Krishnamurthi. Semantics and scoping of aspects in higher-order languages. Science of Computer Programming, 63(3):207--239, December 2006.
[12]
Matthias Felleisen, Robert Bruce Findler, and Matthew Flatt. Semantics Engineering with PLT Redex. The MIT Press, 2009. To appear.
[13]
Gregor Kiczales. Towards a new model of abstraction in software engineering. In Proceedings of the IMSA 92 Workshop on Reflection and Metalevel Architectures. Akinori Yonezawa and Brian C. Smith, editors, 1992.
[14]
Gregor Kiczales. Personal communication, May 2009.
[15]
Gregor Kiczales, Jim des Rivières, and Daniel G. Bobrow. The Art of the Metaobject Protocol. MIT Press, 1991.
[16]
Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William Griswold. An overview of AspectJ. In Jorgen L. Knudsen, editor, Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP 2001), number 2072 in Lecture Notes in Computer Science, pages 327--353, Budapest, Hungary, June 2001. Springer-Verlag.
[17]
Paul Leger, Rodolfo Toledo, and Éric Tanter. The AspectScript language. http://pleiad.cl/aspectscript, 2009.
[18]
Pattie Maes. Concepts and experiments in computational reflection. In Norman Meyrowitz, editor, Proceedings of the 2nd International Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 87), pages 147--155, Orlando, Florida, USA, October 1987. ACM Press. ACM SIGPLAN Notices, 22(12).
[19]
Hidehiko Masuhara, Gregor Kiczales, and Christopher Dutchyn. A compilation and optimization model for aspect-oriented programs. In G. Hedin, editor, Proceedings of Compiler Construction (CC2003), volume 2622 of Lecture Notes in Computer Science, pages 46--60. Springer-Verlag, 2003.
[20]
Brian C. Smith. Reflection and semantics in a procedural language. Technical Report 272, MIT Laboratory of Computer Science, 1982.
[21]
Éric Tanter. Aspects of composition in the Reflex AOP kernel. In Welf Löwe and Mario Südholt, editors, Proceedings of the 5th International Symposium on Software Composition (SC 2006), volume 4089 of Lecture Notes in Computer Science, pages 98--113, Vienna, Austria, March 2006. Springer-Verlag.
[22]
Éric Tanter. Controlling aspect reentrancy. Journal of Universal Computer Science, 14(21):3498--3516, 2008.
[23]
Éric Tanter. Expressive scoping of dynamically-deployed aspects. In Proceedings of the 7th ACM International Conference on Aspect-Oriented Software Development (AOSD 2008), pages 168--179, Brussels, Belgium, April 2008. ACM Press.
[24]
Éric Tanter. Beyond static and dynamic scope. In Proceedings of the 5th ACM Dynamic Languages Symposium (DLS 2009), pages 3--14, Orlando, FL, USA, October 2009. ACM Press.
[25]
Éric Tanter. Higher-order aspects in order. In Scheme and Functional Programming Workshop, Boston, MA, USA, August 2009.
[26]
Éric Tanter and Johan Fabry. Supporting composition of structural aspects in an AOP kernel. Journal of Universal Computer Science, 15(3):620--647, 2009.
[27]
Éric Tanter, Johan Fabry, Rémi Douence, Jacques Noyé, and Mario Südholt. Expressive scoping of distributed aspects. In Proceedings of the 8th ACM International Conference on Aspect-Oriented Software Development (AOSD 2009), pages 27--38, Charlottesville, Virginia, USA, March 2009. ACM Press.
[28]
Rodolfo Toledo, Paul Leger, and Éric Tanter. AspectScript: Expressive aspects for the Web. In Proceedings of the 9th ACM International Conference on Aspect-Oriented Software Development (AOSD 2010), Rennes and Saint Malo, France, March 2010. ACM Press.
[29]
Mitchell Wand and Daniel P. Friedman. The mystery of the tower revealed: a non-reflective description of the reflective tower. Lisp and Symbolic Computation, 1(1):11--37, 1988.
[30]
Mitchell Wand, Gregor Kiczales, and Christopher Dutchyn. A semantics for advice and dynamic join points in aspect-oriented programming. ACM Transactions on Programming Languages and Systems, 26(5):890--910, September 2004.
[31]
Chris Zimmermann. Advances in Object-Oriented Metalevel Architectures and Reflection. CRC Press, 1996.

Cited By

View all
  • (2025)The Forgotten Potential: Why Aspect-Oriented Programming Faded AwayComputer10.1109/MC.2024.350927258:3(100-104)Online publication date: Mar-2025
  • (2016)Implementation Support of Security Design Patterns Using Test TemplatesInformation10.3390/info70200347:2(34)Online publication date: 15-Jun-2016
  • (2016)Polymorphic bytecode instrumentationSoftware—Practice & Experience10.1002/spe.238546:10(1351-1380)Online publication date: 1-Oct-2016
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
AOSD '10: Proceedings of the 9th International Conference on Aspect-Oriented Software Development
March 2010
242 pages
ISBN:9781605589589
DOI:10.1145/1739230
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

  • AOSA: Aspect-Oriented Software Association

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 15 March 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. aspect-oriented programming
  2. conflation
  3. execution level
  4. infinite regression
  5. meta-programming
  6. scoping mechanism

Qualifiers

  • Research-article

Conference

AOSD '10
Sponsor:
  • AOSA

Acceptance Rates

Overall Acceptance Rate 41 of 139 submissions, 29%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)1
Reflects downloads up to 19 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2025)The Forgotten Potential: Why Aspect-Oriented Programming Faded AwayComputer10.1109/MC.2024.350927258:3(100-104)Online publication date: Mar-2025
  • (2016)Implementation Support of Security Design Patterns Using Test TemplatesInformation10.3390/info70200347:2(34)Online publication date: 15-Jun-2016
  • (2016)Polymorphic bytecode instrumentationSoftware—Practice & Experience10.1002/spe.238546:10(1351-1380)Online publication date: 1-Oct-2016
  • (2015)Trace-based debugging for advanced-dispatching programming languagesProceedings of the 10th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems10.1145/2843915.2843922(1-10)Online publication date: 4-Jul-2015
  • (2015)Reifying the reflectogramProceedings of the 30th Annual ACM Symposium on Applied Computing10.1145/2695664.2695883(1978-1985)Online publication date: 13-Apr-2015
  • (2015)Propagation of Behavioral Variations with Delegation ProxiesTransactions on Aspect-Oriented Software Development XII10.1007/978-3-662-46734-3_2(63-95)Online publication date: 20-Mar-2015
  • (2014)Execution levels for aspect-oriented programmingScience of Computer Programming10.5555/2748144.274839480:PB(311-342)Online publication date: 1-Feb-2014
  • (2014)Delegation proxiesProceedings of the 13th international conference on Modularity10.1145/2577080.2577081(1-12)Online publication date: 22-Apr-2014
  • (2014)Join point interfaces for safe and flexible decoupling of aspectsACM Transactions on Software Engineering and Methodology10.1145/255993323:1(1-41)Online publication date: 20-Feb-2014
  • (2014)Verifying Implementation of Security Design Patterns Using a Test TemplateProceedings of the 2014 Ninth International Conference on Availability, Reliability and Security10.1109/ARES.2014.31(178-183)Online publication date: 8-Sep-2014
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media