JMatch: Iterable Abstract Pattern Matching for Java
The JMatch language extends Java with iterable abstract pattern matching, pattern matching that is compatible with the data abstraction features of Java and makes iteration abstractions convenient. JMatch has ML-style deep pattern matching, but patterns can be abstract; they are not tied to algebraic data constructors.A single JMatch method may be used in several modes; modes may share a single implementation as a boolean formula. Modal abstraction simplifies specification and implementation of abstract data types. This paper describes the JMatch language and its implementation.
Unable to display preview. Download preview PDF.
- [CL00]K. Claessen and P. Ljungl. Typed logical variables in Haskell. In Haskell Workshop 2000, 2000.Google Scholar
- [CLR90]Thomas A. Cormen, Charles E. Leiserson, and Ronald L. Rivest. Introduction to Algorithms. MIT Press, 1990.Google Scholar
- [EKC98]Michael Ernst, Craig Kaplan, and Craig Chambers. Predicate dispatching: A unified theory of dispatch. In 12th European Conference on Object-Oriented Programming, pages 186–211, Brussels, Belgium, July 1998.Google Scholar
- [FB97]Manuel Fähndrich and John Boyland. Statically checkable pattern abstractions. In Proc. 2nd ACM SIGPLAN International Conference on Functional Programming (ICFP), pages 75–84, June 1997.Google Scholar
- [FR99]Remi Forax and Gilles Roussel. Recursive types and pattern matching in java. In Proc. International Symposium on Generative and Component-Based Software Engineering (GCSE’ 99), Erfurt, Germany, September 1999. LNCS 1799.Google Scholar
- [GHK81]Ralph E. Griswold, David R. Hanson, and John T. Korb. Generators in ICON. ACM Transaction on Programming Languages and Systems, 3(2), April 1981.Google Scholar
- [GJS96]James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, August 1996. ISBN 0-201-63451-1.Google Scholar
- [Gre87]Steven Gregory. Parallel Programming in PARLOG. Addison-Wesley, 1987.Google Scholar
- [Han97]Michael Hanus. A unified computation model for functional and logic programming. In Proc. 24th ACM Symp. on Principles of Programming Languages (POPL), pages 80–93, Paris, France, January 1997.Google Scholar
- [HJW92]Paul Hudak, Simon Peyton Jones, and Philip Wadler. Report on the programming language Haskell. SIGPLAN Notices, 27(5), May 1992.Google Scholar
- [JMG+02]Trevor Jim, Greg Morrisett, Dan Grossman, Michael Hicks, James Cheney, and Yanling Wang. Cyclone: A safe dialect of C. In Proceedings of the USENIX Annual Technical Conference, pages 275–288, Monterey, CA, June 2002. See also http://www.cs.cornell.edu/projects/cyclone.
- [L+81]B. Liskov et al. CLU reference manual. In Goos and Hartmanis, editors, Lecture Notes in Computer Science, volume 114. Springer-Verlag, Berlin, 1981.Google Scholar
- [Llo99]John W. Lloyd. Programming in an integrated functional and logic programming language.Journal of Functional and Logic Programming, 3, March 1999.Google Scholar
- [LM02]Jed Liu and Andrew C. Myers. JMatch: Java plus pattern matching. Technical Report TR2002-1878, Computer Science Department, Cornell University, October 2002. Software release at http://www.cs.cornell.edu/projects/jmatch.
- [Mic01]Microsoft Corporation. Microsoft C# Language Specifications. Microsoft Press, 2001. ISBN 0-7356-1448-2.Google Scholar
- [MTH90]Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. MIT Press, Cambridge, MA, 1990.Google Scholar
- [NCM02]Nathaniel Nystrom, Michael Clarkson, and AndrewC. Myers. Polyglot:An extensible compiler framework for Java. Technical Report 2002-1883, Computer Science Dept., Cornell University, 2002.Google Scholar
- [Nel91]Greg Nelson, editor. Systems Programming with Modula-3. Prentice-Hall, 1991.Google Scholar
- [Oka98a]Chris Okasaki. Purely Functional Data Structures. Cambridge University Press, 1998. ISBN 0-521-63124-6.Google Scholar
- [Oka98b]Chris Okasaki. Views for Standard ML. InWorkshop on ML, pages 14–23, September 1998.Google Scholar
- [OW97]Martin Odersky and Philip Wadler. Pizza into Java: Translating theory into practice. In Proc. 24th ACM Symp. on Principles of Programming Languages (POPL), pages 146–159, Paris, France, January 1997.Google Scholar
- [PGPN96]Pedro Palao Gostanza, Ricardo Pena, and Manuel Núñez. A new look at pattern matching in abstract data types. In Proc. 1st ACMSIGPLAN International Conference on Functional Programming (ICFP), Philadelphia, PA, USA, June 1996.Google Scholar
- [Tul00]Mark Tullsen. First-class patterns. In Proc. Practical Aspects of Declarative Languages, 2nd International Workshop (PADL), pages 1–15, 2000.Google Scholar
- [Wad87]Philip Wadler. Views: A way for pattern matching to cohabit with data abstraction. In Proceedings, 14th Symposium on Principles of Programming Languages, pages 307–312. Association for Computing Machinery, 1987.Google Scholar