204 research outputs found

    Effective Aspects: A Typed Monadic Embedding of Pointcuts and Advice

    Get PDF
    International audienceAspect-oriented programming(AOP) aims to enhance modularity and reusability in software systems by offering an abstraction mechanism to deal with crosscutting concerns. However, in most general-purpose aspect languages aspects have almost unrestricted power, eventually conflicting with these goals. In this work we present Effective Aspects: a novel approach to embed the point- cut/advice model of AOP in a statically-typed functional programming language like Haskell. Our work extends EffectiveAdvice, by Oliveira, Schrijvers and Cook; which lacks quantification, and explores how to exploit the monadic setting in the full pointcut/advice model. Type soundness is guaranteed by exploiting the underlying type system, in particular phantom types and a new anti-unification type class. Aspects are first-class, can be deployed dynamically, and the pointcut language is extensible, therefore combining the flexibility of dynamically-typed aspect languages with the guarantees of a static type system. Monads enables us to directly reason about computational effects both in aspects and base programs using traditional monadic techniques. Using this we extend Aldrich's notion of Open Modules with effects, and also with protected pointcut interfaces to external advising. These restrictions are enforced statically using the type system. Also, we adapt the techniques of EffectiveAdvice to reason about and enforce control flow properties. Moreover, we show how to control effect interference us- ing the parametricity-based approach of EffectiveAdvice. However this approach falls short when dealing with interference between multiple aspects. We propose a different approach using monad views, a recently developed technique for han- dling the monad stack. Finally, we exploit the properties of our monadic weaver to enable the modular construction of new semantics for aspect scoping and weaving. These semantics also benefit fully from the monadic reasoning mechanisms present in the language. This work brings type-based reasoning about effects for the first time in the pointcut/advice model, in a framework that is both expressive and extensible; thus allowing development of robust aspect-oriented systems as well as being a useful research tool for experimenting with new aspect semantics

    A Typed Monadic Embedding of Aspects

    Get PDF
    International audienceWe describe a novel approach to embed pointcut/advice aspects in a typed functional programming language like Haskell. Aspects are first-class, can be deployed dynamically, and the pointcut language is extensible. Type soundness is guaranteed by exploiting the un- derlying type system, in particular phantom types and a new anti- unification type class. The use of monads brings type-based rea- soning about effects for the first time in the pointcut/advice setting, thereby practically combining Open Modules and EffectiveAdvice, and enables modular extensions of the aspect language

    What Does Aspect-Oriented Programming Mean for Functional Programmers?

    Get PDF
    Aspect-Oriented Programming (AOP) aims at modularising crosscutting concerns that show up in software. The success of AOP has been almost viral and nearly all areas in Software Engineering and Programming Languages have become "infected" by the AOP bug in one way or another. Interestingly the functional programming community (and, in particular, the pure functional programming community) seems to be resistant to the pandemic. The goal of this paper is to debate the possible causes of the functional programming community's resistance and to raise awareness and interest by showcasing the benefits that could be gained from having a functional AOP language. At the same time, we identify the main challenges and explore the possible design-space

    Type-Directed Weaving of Aspects for Polymorphically Typed Functional Languages

    Get PDF
    Incorporating aspect-oriented paradigm to a polymorphically typed functional language enables the declaration of type-scoped advice, in which the effect of an aspect can be harnessed by introducing possibly polymorphic type constraints to the aspect. The amalgamation of aspect orientation and functional programming enables quick behavioral adaption of functions, clear separation of concerns and expressive type-directed programming. However, proper static weaving of aspects in polymorphic languages with a type-erasure semantics remains a challenge. In this paper, we describe a type-directed static weaving strategy, as well as its implementation, that supports static type inference and static weaving of programs written in an aspect-oriented polymorphically typed functional language, AspectFun. We show examples of type-scoped advice, identify the challenges faced with compile-time weaving in the presence of type-scoped advice, and demonstrate how various advanced aspect features can be handled by our techniques. Lastly, we prove the correctness of the static weaving strategy with respect to the operational semantics of AspectFun

    A Monadic Interpretation of Execution Levels and Exceptions for AOP

    Get PDF
    International audienceAspect-Oriented Programming (AOP) started ten 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 featured that is gradually gaining traction. However, AOP lacks theoretical foundations to clarify new ideas showing up in its wake. 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

    Performing selfhoods in U.S. rituals of private and public spheres

    Get PDF
    In this study, I explore four events to learn the embedded instructions of selfhood performatives in each case and how these performatives code public and private space and experience. The selected events offer a different and explicit example of private and public modes of authority and access – e.g., in the public museum experience of an exhibit by photographer Taryn Simon, in the gift of a ticket to Burning Man, womyn only at MichFest, and insider exclusivity at Roden Crater. While each event offered a different understanding of selfhood as it applied to the participant, each confirmed a selfhood performative in play through its structure, methodology, and dependence on participation. Calling on Louis Althusser’s theories of subjectivity and ideology to approach a definition for selfhood performative, ultimately I argue for a Bakhtinian use of the term. Bakhtin relies on an expansive definition where “selfhood is not a particular voice within, but a particular way of combining many voices within” (Morson and Emerson 221). This “particular way” can be understood as a conscious compositional approach to selfhood served by the performance research practice of mystory developed by Gregory Ulmer. The mystory attempts to record and articulate the relationships of the composer and her interdependent institutional and personal subjectivities through the application of the relay. Throughout the study, I make use of a literal and figurative relay between the events, composing, collecting, and documenting associations while conducting my research and drawing out the patterns and poetics therein. The purpose of the study is to show connections between selfhood performatives and commodification, and to find regularities, ironies, and pleasures between the revealed performatives and codes. I also examine how these events enhance, challenge, or stray from post-structural theories that support the interdependence between selfhood and prevailing concepts of public and private. The study also supports the application of mystory theory, with its resistance to the reproductive elements of a model, as performance research that offers an update to Brecht’s notion of theater “for an audience of the scientific age” (Brecht 185). I attempt to locate today’s audience as one situated in the tension of constructing selves between binary notions of private and public caused by the ramifications of scientific objectification and conceptual representation and reproduction. I argue the mystory is an approach to understanding the self constituted from within the interdependence of private and public relationships, and holds the unrepeatable self central to that approach
    corecore