70 research outputs found

    Cartesian Programming: The TransLucid Programming Language

    Get PDF
    The TransLucid programming language is a low-level intensional language, designed to be sufficiently rich for it to be the target language for translating the common programming paradigms into it, while still being fully declarative. The objects manipulated by TransLucid, called hyperdatons, are arbitrary-dimensional infinite arrays, indexed by multidimensional tuples of arbitrary types. We present the syntax, denotational and operational semantics for a simple TransLucid system, consisting of 1) a header detailing how expressions should be parsed, 2) a set of libraries of types, and operations thereon, defined in a host language, 3) a set of TransLucid equations, and 4) a TransLucid demand to be evaluated. The evaluation of a demand for an (identifier, context) pair is undertaken using eduction, where previously computed pairs are stored in a cache called a warehouse. The execution ensures that only those dimensions actually encountered during the execution of an expression are taken into account when caching intermediate results

    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
    • …
    corecore