Higher-Order and Symbolic Computation

, Volume 24, Issue 1–2, pp 151–189

Side-effect localization for lazy, purely functional languages via aspects

  • Kung Chen
  • Shu-Chun Weng
  • Jia-Yin Lin
  • Meng Wang
  • Siau-Cheng Khoo
Article

Abstract

Many side-effecting programming activities, such as profiling and tracing, can be formulated as crosscutting concerns and be framed as side-effecting aspects in the aspect-oriented programming paradigm. The benefit gained from this separation of concerns is particularly evident in purely functional programming, as adding such aspects using techniques such as monadification will generally lead to crosscutting changes. This paper presents an approach to provide side-effecting aspects for lazy purely functional languages in a user transparent fashion. We propose a simple yet direct state manipulation construct for developing side-effecting aspects and devise a systematic monadification scheme to translate the woven code to monadic style purely functional code. Furthermore, we present a static and dynamic semantics of the aspect programs and reason about the correctness of our monadification scheme with respect to them.

Keywords

Aspect-oriented programming Side-effect Lazy semantics Monadification 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer Science+Business Media, LLC 2011

Authors and Affiliations

  • Kung Chen
    • 1
  • Shu-Chun Weng
    • 2
  • Jia-Yin Lin
    • 1
  • Meng Wang
    • 3
  • Siau-Cheng Khoo
    • 4
  1. 1.National Chengchi UniversityTaipei CityTaiwan
  2. 2.Yale UniversityNew HavenUSA
  3. 3.Oxford UniversityOxfordUK
  4. 4.National University of SingaporeSingaporeSingapore

Personalised recommendations