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

EffectiveAdvice: disciplined advice with explicit effects

Published: 15 March 2010 Publication History

Abstract

Advice is a mechanism, widely used in aspect-oriented languages, that allows one program component to augment or modify the behavior of other components. When advice and other components are composed together they become tightly coupled, sharing both control and data flows. However this creates important problems: modular reasoning about a component becomes very difficult; and two tightly coupled components may interfere with each other's control and data flows.
This paper presents EffectiveAdvice, a disciplined model of advice, inspired by Aldrich's Open Modules, that has full support for effects. With EffectiveAdvice, equivalence of advice, as well as base components, can be checked by equational reasoning. The paper describes EffectiveAdvice as a Haskell library in which advice is modeled by mixin inheritance and effects are modeled by monads. Interference patterns previously identified in the literature are expressed as combinators. Parametricity, together with the combinators, is used to prove two harmless advice theorems. The result is an effective semantic model of advice that supports effects, and allows these effects to be separated with strong non-interference guarantees, or merged as needed.

References

[1]
J. Aldrich. Open modules: Modular reasoning about advice. In ECOOP'05, 2005.
[2]
G. Bracha and W. R. Cook. Mixin-based inheritance. In OOPSLA'90, 1990.
[3]
D. Brown and W. R. Cook. Monadic memoization mixins. Technical Report TR-07-11, The University of Texas, 2007.
[4]
K. Chen, S. Weng, M. Wang, S. Khoo, and C. Chen. A compilation model for aspect-oriented polymorphically typed functional languages. In SAS'07, 2007.
[5]
C. Clifton and G. T. Leavens. Observers and Assistants: A Proposal for Modular Aspect-Oriented Reasoning. In FOAL '02, 2002.
[6]
C. Clifton, G. T. Leavens, and J. Noble. MAO: Ownership and effects for more effective reasoning about aspects. In ECOOP'07, 2007.
[7]
W. R. Cook. A Denotational Semantics of Inheritance. PhD thesis, Brown University, 1989.
[8]
D. S. Dantas and D. Walker. Harmless advice. In POPL '06, 2006.
[9]
D. S. Dantas, D. Walker, G. Washburn, and S. Weirich. AspectML: A polymorphic aspect-oriented functional programming language. ACM TOPLAS, 30(3):1--60, 2008.
[10]
W. De Meuter. Monads as a theoretical foundation for AOP. In International Workshop on Aspect-Oriented Programming at ECOOP, 1997.
[11]
R. Douence, P. Fradet, and M. Südholt. Composition, reuse and interaction analysis of stateful aspects. In AOSD'04, 2004.
[12]
C. Dutchyn, D. B. Tucker, and S. Krishnamurthi. Semantics and scoping of aspects in higher-order languages. Sci. Comput. Program., 63(3):207--239, 2006.
[13]
R. E. Filman and D. P. Friedman. Aspect-oriented programming is quantification and obliviousness. In Workshop on Advanced Separation of Concerns, 2000.
[14]
B. D. Fraine and M. Braem. Requirements for reusable aspect deployment. In Software Composition, 2007.
[15]
C. Hofer and K. Ostermann. On the relation of aspects and monads. In FOAL'07, 2007.
[16]
G. Kiczales and M. Mezini. Aspect-oriented programming and modular reasoning. In ICSE'05, 2005.
[17]
G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J. Loingtier, and J. Irwin. Aspect-oriented programming. In ECOOP'97, 1997.
[18]
K. Läufer. What functional programmers can learn from the Visitor pattern. Tech. rep., Loyola University Chicago, 2003.
[19]
J. R. Lewis, J. Launchbury, E. Meijer, and M. B. Shields. Implicit parameters: dynamic scoping with static types. In POPL'00, 2000.
[20]
S. Liang, P. Hudak, and M. Jones. Monad transformers and modular interpreters. In POPL'95, 1995.
[21]
J. Ligatti, D. Walker, and S. Zdancewic. A type-theoretic interpretation of pointcuts and advice. Sci. Comput. Program., 63(3):240--266, 2006.
[22]
R. Lopez-Herrejon, D. Batory, and C. Lengauer. A disciplined approach to aspect composition. In PEPM'06, 2006.
[23]
H. Masuhara, H. Tatsuzawa, and A. Yonezawa. Aspectual Caml: an aspect-oriented functional language. In ICFP'05, 2005.
[24]
B. J. McAdam. That about wraps it up --- using fix to handle errors without exceptions, and other programming tricks. Technical report, Laboratory for Foundations of Computer Science, The University of Edinburgh, 1997.
[25]
A. Moors, F. Piessens, and M. Odersky. Generics of a higher kind. In OOPSLA '08, 2008.
[26]
B. C. d. S. Oliveira, T. Schrijvers, and W. R. Cook. EffectiveAdvice: Overview, background and proofs. Report CW 556, Dept. of Computer Science, K.U. Leuven, Belgium, 2009.
[27]
S. Peyton Jones and P. Wadler. Imperative functional programming. In POPL'93, 1993.
[28]
S. Peyton Jones, D. Vytiniotis, S. Weirich, and M. Shields. Practical type inference for arbitrary-rank types. J. Funct. Program., 17(01):1--82, 2007.
[29]
C. Prehofer. Semantic reasoning about feature composition via multiple aspect-weavings. In GPCE'06, 2006.
[30]
C. Prehofer. Feature-oriented programming: A fresh look at objects. In ECOOP'97, 1997.
[31]
C. Prehofer. Flexible construction of software components: A feature oriented approach. Habilitation Thesis, Fakultät für Informatik der Technischen Universität München, 1999.
[32]
M. Rinard, A. Salcianu, and S. Bugrara. A classification system and analysis for aspect-oriented programs. ACM SIGSOFT Softw. Eng. Notes, 29(6):147--158, 2004.
[33]
R. Stata and J. V. Guttag. Modular reasoning in the presence of subclassing. SIGPLAN Not., 30(10):200--214, 1995.
[34]
E. Tanter. Expressive scoping of dynamically-deployed aspects. In AOSD'08, pages 168--179, 2008.
[35]
J. Voigtländer. Free theorems involving type constructor classes. In ICFP '09, 2009.
[36]
P. Wadler. Theorems for free! In FPLCA'89. 1989.
[37]
P. Wadler. The essence of functional programming. In POPL'92, 1992.
[38]
P. Wadler. Monads for functional programming. In Program Design Calculi: Marktoberdorf International Summer School, 1993.

Cited By

View all
  • (2019)Chemical foundations of distributed aspectsDistributed Computing10.1007/s00446-018-0334-632:3(193-216)Online publication date: 1-Jun-2019
  • (2016)Modular Reasoning in the Presence of Event SubtypingTransactions on Modularity and Composition I10.1007/978-3-319-46969-0_5(167-223)Online publication date: 30-Sep-2016
  • (2015)Modular reasoning in the presence of event subtypingProceedings of the 14th International Conference on Modularity10.1145/2724525.2724569(117-132)Online publication date: 16-Mar-2015
  • 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. AOP
  2. interference
  3. mixins
  4. monads
  5. parametricity

Qualifiers

  • Research-article

Funding Sources

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)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 25 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2019)Chemical foundations of distributed aspectsDistributed Computing10.1007/s00446-018-0334-632:3(193-216)Online publication date: 1-Jun-2019
  • (2016)Modular Reasoning in the Presence of Event SubtypingTransactions on Modularity and Composition I10.1007/978-3-319-46969-0_5(167-223)Online publication date: 30-Sep-2016
  • (2015)Modular reasoning in the presence of event subtypingProceedings of the 14th International Conference on Modularity10.1145/2724525.2724569(117-132)Online publication date: 16-Mar-2015
  • (2014)Compositional reasoning about aspect interferenceProceedings of the 13th international conference on Modularity10.1145/2577080.2577093(133-144)Online publication date: 22-Apr-2014
  • (2014)Effective Aspects: A Typed Monadic Embedding of Pointcuts and AdviceTransactions on Aspect-Oriented Software Development XI10.1007/978-3-642-55099-7_5(145-192)Online publication date: 2014
  • (2013)Modular monadic meta-theoryACM SIGPLAN Notices10.1145/2544174.250058748:9(319-330)Online publication date: 25-Sep-2013
  • (2013)EsseOSProceedings of the 12th International Workshop on Adaptive and Reflective Middleware10.1145/2541583.2541587(1-6)Online publication date: 9-Dec-2013
  • (2013)Modular monadic meta-theoryProceedings of the 18th ACM SIGPLAN international conference on Functional programming10.1145/2500365.2500587(319-330)Online publication date: 25-Sep-2013
  • (2013)Meta-theory à la carteACM SIGPLAN Notices10.1145/2480359.242909448:1(207-218)Online publication date: 23-Jan-2013
  • (2013)Towards control of aspect interference using membranes and monadsProceedings of the 12th annual international conference companion on Aspect-oriented software development10.1145/2457392.2457404(27-28)Online publication date: 24-Mar-2013
  • 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

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media