Skip to main content

Predicated Generic Functions

Enabling Context-Dependent Method Dispatch

  • Conference paper
Book cover Software Composition (SC 2010)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6144))

Included in the following conference series:

Abstract

This paper presents predicated generic functions, a novel programming language abstraction that allows the expression of context-dependent behaviour in a declarative and modular manner, providing fine-grained control of method applicability and method specificity. Methods are guarded by predicates with user-defined orderings, thereby increasing the expressiveness of existing method dispatching approaches. We have prototyped our proposal in Lambic, an extension of the standard Common Lisp Object System. We illustrate and motivate our approach by discussing the implementation of a collaborative graphical editor.

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 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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bardou, D., Dony, C.: Split objects: A disciplined use of delegation within objects. ACM SIGPLAN Notices 31(10), 122–137 (1996)

    Article  Google Scholar 

  2. Bergel, A., Ducasse, S., Nierstrasz, O., Wuyts, R.: Classboxes: Controlling visibility of class extensions. Journal of Computer Languages, Systems and Structures 31(3), 107–126 (2005)

    Article  MATH  Google Scholar 

  3. Bobrow, D., DeMichiel, L., Gabriel, R., Keene, S., Kiczales, G., Moon, D.: Common Lisp Object System. specification. Lisp and Symbolic Computation 1(3/4), 245–394 (1989)

    Google Scholar 

  4. Chambers, C.: Predicate classes. In: Nierstrasz, O. (ed.) ECOOP 1993. LNCS, vol. 707, pp. 268–296. Springer, Heidelberg (1993)

    Chapter  Google Scholar 

  5. Chambers, C., Chen, W.: Efficient multiple and predicated dispatching. In: Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pp. 238–255. ACM Press, New York (1999)

    Chapter  Google Scholar 

  6. Chandra Sekharaiah, K., Janaki Ram, D.: Object schizophrenia problem in object role system design. In: Bellahsène, Z., Patel, D., Rolland, C. (eds.) OOIS 2002. LNCS, vol. 2425, pp. 1–8. Springer, Heidelberg (2002)

    Google Scholar 

  7. Clifton, C., Leavens, G., Chambers, C., Millstein, T.: MultiJava: Modular open classes and symmetric multiple dispatch for Java. In: Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pp. 130–145. ACM Press, New York (2000)

    Chapter  Google Scholar 

  8. Costanza, P.: Dynamically scoped functions as the essence of AOP. ACM SIGPLAN Notices 38(8), 29–36 (2003)

    Article  Google Scholar 

  9. Costanza, P., Herzeel, C., Vallejos, J., D’Hondt, T.: Filtered dispatch. In: Proceedings of the Dynamic Languages Symposium. ACM Press, New York (2008), co-located with ECOOP 2008

    Google Scholar 

  10. Costanza, P., Hirschfeld, R.: Language constructs for context-oriented programming: an overview of ContextL. In: Proceedings of the Dynamic Languages Symposium, October 2005, pp. 1–10. ACM Press, New York (2005), co-located with OOPSLA 2005

    Google Scholar 

  11. Ernst, M., Kaplan, C., Chambers, C.: Predicate dispatching: A unified theory of dispatch. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 186–211. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  12. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Professional Computing Series. Addison-Wesley, Reading (1995)

    Google Scholar 

  13. González, S., Mens, K., Heymans, P.: Highly dynamic behaviour adaptability through prototypes with subjective multimethods. In: Proceedings of the Dynamic Languages Symposium, October 2007, pp. 77–88. ACM Press, New York (2007), co-located with OOPSLA 2007

    Google Scholar 

  14. Herzeel, C., Costanza, P., D’Hondt, T.: Reflection for the masses. In: Hirschfeld, R., Rose, K. (eds.) S3 2008. LNCS, vol. 5146, pp. 87–122. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  15. Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented programming. Journal of Object Technology 7(3), 125–151 (2008)

    Google Scholar 

  16. Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J.M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  17. Lieberman, H.: Using prototypical objects to implement shared behavior in object-oriented systems. ACM SIGPLAN Notices 21, 214–223 (1986)

    Article  MathSciNet  Google Scholar 

  18. Malenfant, J., Dony, C., Cointe, P.: A semantics of introspection in a reflective prototype-based language. In: LISP and Symbolic Computation, May 1996, vol. 9, pp. 153–179. Springer, Netherlands (1996)

    Google Scholar 

  19. Newton, J., Rhodes, C.: Custom specializers in object-oriented Lisp. Journal of Universal Computer Science 14(20), 3370–3388 (2008)

    Google Scholar 

  20. Steele, G.: Common Lisp: The Language, 2nd edn. Digital Press (1990)

    Google Scholar 

  21. Taivalsaari, A.: Object-oriented programming with modes. Journal of Object-Oriented Programming 6(3), 25–32 (1993)

    Google Scholar 

  22. Tanter, E., Gybels, K., Denker, M., Bergel, A.: Context-aware aspects. In: Löwe, W., Südholt, M. (eds.) SC 2006. LNCS, vol. 4089, pp. 227–242. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  23. Vallejos, J., Costanza, P., Van Cutsem, T., De Meuter, W.: Reconciling Generic Functions with Actors. In: ACM SIGPLAN International Lisp Conference, Cambridge, Massachusetts (2009)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Vallejos, J., González, S., Costanza, P., De Meuter, W., D’Hondt, T., Mens, K. (2010). Predicated Generic Functions. In: Baudry, B., Wohlstadter, E. (eds) Software Composition. SC 2010. Lecture Notes in Computer Science, vol 6144. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14046-4_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-14046-4_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-14045-7

  • Online ISBN: 978-3-642-14046-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics