Predicated Generic Functions

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.

[1]  Satoshi Matsuoka,et al.  ECOOP'97 — Object-Oriented Programming , 1997, Lecture Notes in Computer Science.

[2]  D. Janaki Ram,et al.  Object Schizophrenia Problem in Object Role System Design , 2002, OOIS.

[3]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[4]  Pascal Costanza,et al.  Dynamically scoped functions as the essence of AOP , 2003, SIGP.

[5]  Theo D'Hondt,et al.  Filtered dispatch , 2008, DLS '08.

[6]  Guy L. Steele,et al.  Common Lisp the Language , 1984 .

[7]  Robert Hirschfeld,et al.  Language constructs for context-oriented programming: an overview of ContextL , 2005, DLS '05.

[8]  Martin Odersky,et al.  A Statically Safe Alternative to Virtual Types , 1998, ECOOP.

[9]  Pierre Cointe,et al.  A semantics of introspection in a reflective prototype-based language , 1996, LISP Symb. Comput..

[10]  Oscar Nierstrasz,et al.  Classboxes: controlling visibility of class extensions , 2005, Comput. Lang. Syst. Struct..

[11]  Craig S. Kaplan,et al.  Predicate Dispatching: A Unified Theory of Dispatch , 1998, ECOOP.

[12]  Christophe Rhodes,et al.  Custom Specializers in Object-Oriented Lisp , 2008, J. Univers. Comput. Sci..

[13]  Daniel G. Bobrow,et al.  Common lisp object system specification , 1988, SIGP.

[14]  Craig Chambers,et al.  Efficient multiple and predicated dispatching , 1999, OOPSLA '99.

[15]  Theo D'Hondt,et al.  Reflection for the Masses , 2008, S3.

[16]  Jr. Guy L. Steele,et al.  Common LISP: the language (2nd ed.) , 1990 .

[17]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[18]  Kim Mens,et al.  Highly dynamic behaviour adaptability through prototypes with subjective multimethods , 2007, DLS '07.

[19]  Henry Lieberman,et al.  Using Prototypical Objects to Implement Shared Behavior in Object Oriented Systems , 1986, OOPSLA.

[20]  Dimitri Konstantas,et al.  Object-Oriented Information Systems , 2002, Lecture Notes in Computer Science.

[21]  Oscar Nierstrasz,et al.  Context-oriented Programming , 2008, J. Object Technol..

[22]  Gary T. Leavens,et al.  MultiJava: modular open classes and symmetric multiple dispatch for Java , 2000, OOPSLA '00.

[23]  Craig Chambers,et al.  Predicate Classes , 1993, ECOOP.

[24]  Robert Hirschfeld,et al.  Self-Sustaining Systems, First Workshop, S3 2008, Potsdam, Germany, May 15-16, 2008, Revised Selected Papers , 2008, S3.

[25]  Alexandre Bergel,et al.  Context-Aware Aspects , 2006, SC@ETAPS.

[26]  Christophe Dony,et al.  Split objects: a disciplined use of delegation within objects , 1996, OOPSLA '96.

[27]  Oscar M. Nierstrasz,et al.  ECOOP’ 93 — Object-Oriented Programming , 2000, Lecture Notes in Computer Science.