A monadic interpretation of execution levels and exceptions for AOP

  • Authors:
  • Nicolas Tabareau

  • Affiliations:
  • INRIA, Nantes, France

  • Venue:
  • Proceedings of the 11th annual international conference on Aspect-oriented Software Development
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Aspect-Oriented Programming (AOP) started fifteen years ago with the remark that modularization of so-called crosscutting functionalities is a fundamental problem for the engineering of large-scale applications. Originating at Xerox PARC, this observation has sparked the development of a new style of programming features that is gradually gaining traction. However, theoretical foundations of AOP have been much less studied than its applicability. This paper proposes to put a bridge between AOP and the notion of 2-category to enhance the conceptual understanding of AOP. Starting from the connection between the λ-calculus and the theory of categories, we provide an internal language for 2-categories and show how it can be used to define the first categorical semantics for a realistic functional AOP language, called MinAML. We then take advantage of this new categorical framework to introduce the notion of computational 2-monads for AOP. We illustrate their conceptual power by defining a 2-monad for Éric Tanter's execution levels---which constitutes the first algebraic semantics for execution levels---and then introducing the first exception monad transformer specific to AOP that gives rise to a non-flat semantics for exceptions by taking levels into account.