Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
research:software:haskellaop [2012/10/02 10:25] – [Source Code] ifiguero | research:software:haskellaop [2013/02/04 14:41] – [Aspect-Oriented Programming in Haskell] ifiguero |
---|
====== A Typed Monadic Embedding of Aspects ====== | ====== Aspect-Oriented Programming in Haskell ====== |
| This is the main page for our research on aspect-oriented programming (AOP) in Haskell. We have developed the Haskell AOP library that provides the full pointcut/advice model of AOP into a monadic setting. Read below for further details. |
| |
We developed 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 underlying type system, in particular phantom types and a new anti-unification type class. The use of monads brings type-based reasoning about effects for the first time in the pointcut/advice setting, and makes it possible to modularly extend or modify the aspect language. | |
| |
====== GHC Extensions ====== | ====== A Typed Monadic Embedding of Aspects (AOSD 2013) ====== |
We implemented our approach in the Glasgow Haskell Compiler, GHC. [[http://pleiad.dcc.uchile.cl/research/software/haskellaop/ghc-extensions|Here]] we detail the extensions used. | |
| We developed 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 underlying type system, in particular phantom types and a new anti-unification type class. The use of monads brings type-based reasoning about effects for the first time in the pointcut/advice setting, and makes it possible to modularly extend or modify the aspect language. |
| |
====== Source Code ====== | ====== Source Code ====== |
The source can be downloaded {{:research:software:aop1.zip | here}}. See the included README file for details. We tested the software in the [[http://hackage.haskell.org/platform/|Haskell Platform]] version 2012.2.0.0. | |
| ===== Original code from AOSD 2013 ===== |
| The original source of the AOSD 2013 paper can be downloaded {{:research:software:aop2.zip | here}}. See the included README file for details. |
| |
| ===== Taming Aspects with Monads and Membranes (FOAL 2013) ===== |
| The source of our FOAL 2013 submission can be downloaded {{:research:software:aomonad-foal13.zip | here}}. This is an updated revision of the previous code with programmable membranes semantics for aspect-oriented programming. See the included README and README-FOAL file for details. |
| |
| ====== About the Code ====== |
| |
| We tested the software in the [[http://hackage.haskell.org/platform/|Haskell Platform]] version 2012.2.0.0. Consequently, we used the Glasgow Haskell Compiler, GHC, with the following [[http://pleiad.dcc.uchile.cl/research/software/haskellaop/ghc-extensions|extensions]]. |
| |
The code depends on the following packages: | The code depends on the following packages: |
* polytypeable | * polytypeable |
* ghc-prim | * ghc-prim |
| * fgl (functional graph library, for the membrane semantics) |
| |
Which can be installed using the [[http://www.haskell.org/haskellwiki/Cabal-Install | cabal package manager]] included with the Haskell Platform. | Which can be installed using the [[http://www.haskell.org/haskellwiki/Cabal-Install | cabal package manager]] included with the Haskell Platform. |
We include the paper examples, and tests used during development. The main difference between the code in the paper and the source code are: | We include the paper examples, and tests used during development. The main difference between the code in the paper and the source code are: |
| |
* deployment/undeploy: we define the AOPMonad class with the deploy/undeploy top-level operations. These functions use the underlying deployInEnv / undeployInEnv functions defined by type class MonadDeploy. | * deployment/undeployment: we define the AOPMonad class with the deploy/undeploy top-level operations. These functions use the underlying deployInEnv / undeployInEnv functions defined by type class MonadDeploy. |
| |
* In file Function.hs we define tagged functions to provide a more robust notion of function equality. Join points, open function application, and weaving are modified to accept this new kind of functions. | * In file Function.hs we define tagged functions to provide a more robust notion of function equality. Join points, open function application, and weaving are modified to accept this new kind of functions. |