Mixin modules and computational effects

  • Authors:
  • Davide Ancona;Sonia Fagorzi;Eugenio Moggi;Elena Zucca

  • Affiliations:
  • DISI, Univ. of Genova, Genova, Italy;DISI, Univ. of Genova, Genova, Italy;DISI, Univ. of Genova, Genova, Italy;DISI, Univ. of Genova, Genova, Italy

  • Venue:
  • ICALP'03 Proceedings of the 30th international conference on Automata, languages and programming
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

We define a calculus for investigating the interactions between mixin modules and computational effects, by combining the purely functional mixin calculus CMS with a monadic metalanguage supporting the two separate notions of simplification (local rewrite rules) and computation (global evaluation able to modify the store). This distinction is important for smoothly integrating the CMS rules (which are all local) with the rules dealing with the imperative features. In our calculus mixins can contain mutually recursive computational components which are explicitly computed by means of a new mixin operator whose semantics is defined in terms of a Haskell-like recursive monadic binding. Since we mainly focus on the operational aspects, we adopt a simple type system like that for Haskell, that does not detect dynamic errors related to bad recursive declarations involving effects. The calculus serves as a formal basis for defining the semantics of imperative programming languages supporting first class mixins while preserving the CMS equational reasoning.