Skip to main content

Mixin Modules and Computational Effects

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2719))

Abstract

We define a calculus for investigating the interactions between mixin modules and computational effects, by combining the purely functional mixin calculus CMS witha 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) withth e rules dealing withth e 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.

Supported by MIUR project NAPOLI, EU project DART IST-2001-33477 and thematic network APPSEM II IST-2001-38957

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. D. Ancona and E. Zucca. A primitive calculus for module systems. In G. Nadathur, editor, Principles and Practice of Declarative Programming, 1999, number 1702 in Lecture Notes in Computer Science, pages 62–79. Springer Verlag, 1999.

    Chapter  Google Scholar 

  2. D. Ancona and E. Zucca. A calculus of module systems. Journal of Functional Programming, 12(2):91–132, March 2002.

    Article  MATH  MathSciNet  Google Scholar 

  3. G. Bracha and W. Cook. Mixin-based inheritance. In Proc. of the Joint ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications and the European Conference on Object-Oriented Programming, October 1990.

    Google Scholar 

  4. G. Boudol. The recursive record semantics of objects revisited. To appear in Journal of Functional Programming, 2002.

    Google Scholar 

  5. G. Bracha. The Programming Language JIGSAW: Mixins, Modularity and Multiple Inheritance. PhD thesis, Department of Comp. Sci., Univ. of Utah, 1992.

    Google Scholar 

  6. W.R. Cook. ADenotational Semantics of Inheritance. PhD thesis, Dept. of Computer Science, Brown University, 1989.

    Google Scholar 

  7. D. Duggan and C. Sourelis. Mixin modules. In Intl. Conf. on Functional Programming, Philadelphia, May 1996. ACM Press.

    Google Scholar 

  8. L. Erkök and J. Launchbury. Recursive monadic bindings. In Intl. Conf. on Functional Programming 2000, pages 174–185, 2000.

    Google Scholar 

  9. L. Erkök and J. Launchbury. A recursive do for Haskell. In Haskell Workshop’ 02, pages 29–37, 2002.

    Google Scholar 

  10. L. Erkök, J. Launchbury, and A. Moran. Semantics of fixIO. In FICS’01, 2001.

    Google Scholar 

  11. L. Erkök, J. Launchbury, and A. Moran. Semantics of value recursion for monadic input/output. Journal of Theoretical Informatics and Applications, 36(2):155–180, 2002.

    Article  MATH  Google Scholar 

  12. R.B. Findler and M. Flatt. Modular object-oriented programming withunits and mixins. In Intl. Conf. on Functional Programming 1998, September 1998.

    Google Scholar 

  13. M. Flatt and M. Felleisen. Units: Cool modules for HOT languages. In PLDI’98-ACM Conf. on Programming Language Design and Implementation, pages 236–248, 1998.

    Google Scholar 

  14. A. V. Hense. Denotational semantics of an object-oriented programming language with explicit wrappers. Formal Aspects of Computing,5(3):181–207, 1993.

    Article  MATH  Google Scholar 

  15. R. Harper and M. Lillibridge. A type-theoretic approach to higher-order modules withsh aring. In Conference record of POPL’ 94: 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 123–137, 1994.

    Google Scholar 

  16. T. Hirschowitz and X. Leroy. Mixin modules in a call-by-value setting. In D. Le Métayer, editor, ESOP 2002-Programming Languages and Systems, number 2305 in Lecture Notes in Computer Science, pages 6–20. Springer Verlag, 2002.

    Chapter  Google Scholar 

  17. X. Leroy. Manifest types, modules and separate compilation. In Proc. 21st ACM Symp. on Principles of Programming Languages, pages 109–122. ACM Press, 1994.

    Google Scholar 

  18. E. Moggi and S. Fagorzi. A Monadic Multi-stage Metalanguage. In A.D. Gordon, editor, Foundations of Software Science and Computational Structures-FOSSACS 2003, volume 2620 of LNCS, pages 358–374. Springer Verlag, 2003.

    Chapter  Google Scholar 

  19. E. Machkasova and F.A. Turbak. A calculus for link-time compilation. In G. Smolka, editor, ESOP 2000-Programming Languages and Systems, number 1782 in Lecture Notes in Computer Science, pages 260–274, Berlin, 2000. Springer Verlag.

    Chapter  Google Scholar 

  20. U. S. Reddy. Objects as closures: Abstract semantics of object-oriented languages. In Proc. ACM Conf. on Lisp and Functional Programming, pages 289–297, 1988.

    Google Scholar 

  21. Andrew K. Wright and Matthias Felleisen. A syntactic approach to type soundness. Information and Computation, 115(1):38–94, 1994.

    Article  MATH  MathSciNet  Google Scholar 

  22. J.B. Wells and R. Vestergaard. Equational reasoning for linking with first-class primitive modules. In G. Smolka, editor, ESOP 2000-Programming Languages and Systems, number 1782 in Lecture Notes in Computer Science, pages 412–428, Berlin, 2000. Springer Verlag.

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ancona, D., Fagorzi, S., Moggi, E., Zucca, E. (2003). Mixin Modules and Computational Effects. In: Baeten, J.C.M., Lenstra, J.K., Parrow, J., Woeginger, G.J. (eds) Automata, Languages and Programming. ICALP 2003. Lecture Notes in Computer Science, vol 2719. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45061-0_20

Download citation

  • DOI: https://doi.org/10.1007/3-540-45061-0_20

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40493-4

  • Online ISBN: 978-3-540-45061-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics