Practical predicate dispatch

作者: Todd Millstein

DOI: 10.1145/1028976.1029006

关键词:

摘要: Predicate dispatch is an object-oriented (OO) language mechanism for determining the method implementation to be invoked upon a message send. With predicate dispatch, each includes guard specifying conditions under which should invoked, and logical implication of predicates determines overriding relation. naturally unifies generalizes several common forms dynamic including traditional OO multimethod functional-style pattern matching. Unfortunately, prior languages supporting have had deficiencies that limit its utility in practice.We introduce JPred, backward-compatible extension Java dispatch. While with been extensions toy or non-mainstream languages, we show how can added language. required whole program available type-checking compilation, JPred retains Java's modular typechecking compilation strategies. included special-purpose algorithms reasoning about predicates, employs general-purpose, off-the-shelf decision procedures. As result, JPred's type system more flexible, allowing useful programming idioms are spuriously rejected by those other languages. After describing system, present case study illustrating real-world application, use detection errors.

参考文章(52)
Jed Liu, Andrew C. Myers, JMatch: Iterable Abstract Pattern Matching for Java practical aspects of declarative languages. pp. 110- 127 ,(2003) , 10.1007/3-540-36388-2_9
Gary T. Leavens, Olga Antropova, ACL -- Eliminating Parameter Aliasing with Dynamic Dispatch ,(1998)
Richard Helm, John Vlissides, Ralph Johnson, Erich Gamma, Design Patterns: Elements of Reusable Object-Oriented Software ,(1994)
Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Extensible markup language World Wide Web. ,vol. 2, pp. 29- 66 ,(1997) , 10.5555/274784.273625
Todd David Millstein, Craig Chambers, Reconciling software extensibility with modular program reasoning University of Washington. ,(2003)
H. Abelson, R.K. Dybvig, C.T. Haynes, G.J. Rozas, N.I. Adams IV, D.P. Friedman, E. Kohlbecker, G.L. Steele Jr., D.H. Bartley, R. Halstead, D. Oxley, G.J. Sussman, G. Brooks, C. Hanson, K.M. Pitman, M. Wand, Revised Report on the Algorithmic Language Scheme Higher-Order and Symbolic Computation archive. ,vol. 11, pp. 7- 105 ,(1998) , 10.1023/A:1010051815785
Nathaniel Nystrom, Michael R. Clarkson, Andrew C. Myers, Polyglot: an extensible compiler framework for Java compiler construction. pp. 138- 152 ,(2003) , 10.1007/3-540-36579-6_11
Mads Tofte, Mads Tofte, Robert Harper, Robin Milner, The Definition of Standard ML ,(1990)
Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Extensible Markup Language (XML). World Wide Web. ,vol. 2, pp. 27- 66 ,(1997)
David Gay, Philip Levis, Robert von Behren, Matt Welsh, Eric Brewer, David Culler, The nesC language: a holistic approach to networked embedded systems programming language design and implementation. ,vol. 49, pp. 1- 11 ,(2003) , 10.1145/2641638.2641652