Skip to main content

From Inheritance to Feature Interaction or Composing Monads

  • Conference paper
Informatik ’97 Informatik als Innovationsmotor

Part of the book series: Informatik aktuell ((INFORMAT))

Abstract

We show that techniques for monad composition in functional programming can be used nicely for modeling object-oriented programming concepts. In this functional setting, we compose objects from individual features in a modular way. Features are similar to abstract subclasses, but separate the core functionality of a subclass from overwriting methods. We view method overwriting more generally as resolving interactions between two features. The interaction handling is specified separately and added when features are composed. This generalizes inheritance as found in object-oriented languages and leads to a new view of objects in a functional setting. Our concepts are implemented in Gofer using monadic programming techniques.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. H. Barendregt. Introduction to generalized type systems. Journal of Functional Programming, 1(2):125–154 April 1991.

    MathSciNet  MATH  Google Scholar 

  2. Gilad Bracha and William Cook. Mixin-based inheritance. ACM SIGPLAN Notices 25(10):303–311, October 1990. OOPSLA ECOOP ’90 Proceedings, N Meyrowitz (editor).

    Article  Google Scholar 

  3. K. E. Cheng and T Ohta, editors. Feature Interactions in Telecommunications 111. IOSPress, Tokyo, Japan, Oct 1995.

    Google Scholar 

  4. D. Espinosa. Semantic Lego. PhD thesis, Columbia University, 1995.

    Google Scholar 

  5. James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison Wesley, September 1996.

    MATH  Google Scholar 

  6. Mark P Jones. Introduction to Gofer 2.20. Technical report, Yale University, September 1991.

    Google Scholar 

  7. M. P. Jones. A system of constructor classes: overloading and implicit higher—order polymorphism. Journal of Functional Programming, 5(1) January 1995.

    Google Scholar 

  8. Mark P Jones and Luc Duponcheel. Composing monads. Technical Report RR-1004, Yale University, December 1993.

    Google Scholar 

  9. S. L. Peyton Jones and P Wadler. Imperative functional programming. In Proceedings of the Twentieth Annual ACM Symposium on Principles of Programming Languages, Charleston, South Carolina pages 71–84, January 1993.

    Google Scholar 

  10. S. Liang, P Hudak, and M. Jones. Monad transformers and modular interpreters. In 22nd ACM Symposium on Principles of Programming Languages San Francisco, California, 1995.

    Google Scholar 

  11. E. Moggi. Notions of computation and monads. Information and Computation, 93(1),1991.

    Google Scholar 

  12. T. Nipkow and C. Prehofer. Type reconstruction for type classes. J. Functional Programming, 5(2):201–224, 1995. Short version appeared in POPL’93.

    Article  MathSciNet  MATH  Google Scholar 

  13. J. Peterson[editor], K. Hammond[editor], L. Augustsson, B. Boutel, W. Burton, J. Fasel, A. Gordon, J. Hughes, P Hudak, T. Johnsson, M. Jones, S. Peyton Jones, A. Reid, and P Wadler. Haskell 1.3, A non-strict, purely functional language. Report YALEU l DCS I RR—1106, Department of Computer Science, Yale University, May 1996.

    Google Scholar 

  14. C. Prehofer. Feature-oriented programming: A fresh look at objects. In ECOOP ’97 1997. To appear in Springer—LNCS.

    Google Scholar 

  15. Christian Prehofer. From inheritance to feature interaction or composing monads. Technical report, TU Munchen, 1997. TUM—19715.

    Google Scholar 

  16. Christian Prehofer. An object-oriented approach to feature interaction. In Fourth IEEE Workshop on Feature Interactions in Telecommunications networks and distributed systems 1997. to appear.

    Google Scholar 

  17. P. Wadler. Monalds and functional programming. In M. Broy, editor, Proceedings of the 1992 Maktoberdorf international summer school on program design calculi. Springer Verlag, 1993

    Google Scholar 

  18. P. Zave. Feature interactions and formal specifications in telecommunications. IEEE Computer, XXVI(8), August 1993.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Prehofer, C. (1997). From Inheritance to Feature Interaction or Composing Monads. In: Jarke, M., Pasedach, K., Pohl, K. (eds) Informatik ’97 Informatik als Innovationsmotor. Informatik aktuell. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-60831-5_76

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-60831-5_76

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63066-1

  • Online ISBN: 978-3-642-60831-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics