Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Krzysztof R. Apt, Jacob Brunekreef, Vincent Partington, and Andrea Schaerf. Alma-0: An imperative language that supports declarative programming. ACM Transactions on Programming Languages and Systems, 20(5):1014–1066, September 1998.
F.W. Burton and R. D. Cameron. Pattern matching with abstract data types. Journal of Functional Programming, 3(2):171–190, 1993.
K. Claessen and P. Ljungl. Typed logical variables in Haskell. In Haskell Workshop 2000, 2000.
Thomas A. Cormen, Charles E. Leiserson, and Ronald L. Rivest. Introduction to Algorithms. MIT Press, 1990.
Melvin E. Conway. Design of a separable transition-diagram compiler. Communications of the ACM, 6(7):396–408, 1963.
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.
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.
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.
Ralph E. Griswold, David R. Hanson, and John T. Korb. Generators in ICON. ACM Transaction on Programming Languages and Systems, 3(2), April 1981.
James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, August 1996. ISBN 0-201-63451-1.
Steven Gregory. Parallel Programming in PARLOG. Addison-Wesley, 1987.
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.
C. T. Haynes, D. P. Friedman, and M. Wand. Obtaining coroutines from continuations. Journal of Computer Languages, 11(3-4):143–153, 1986.
Paul Hudak, Simon Peyton Jones, and Philip Wadler. Report on the programming language Haskell. SIGPLAN Notices, 27(5), May 1992.
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.
B. Liskov et al. CLU reference manual. In Goos and Hartmanis, editors, Lecture Notes in Computer Science, volume 114. Springer-Verlag, Berlin, 1981.
John W. Lloyd. Programming in an integrated functional and logic programming language.Journal of Functional and Logic Programming, 3, March 1999.
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.
Microsoft Corporation. Microsoft C# Language Specifications. Microsoft Press, 2001. ISBN 0-7356-1448-2.
Stephan Murer, Stephen Omohundro, David Stoutamire, and Clemens Szyperski. Iteration abstraction in Sather. ACM Transactions on Programming Languages and Systems, 18(1):1–15, January 1996.
Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. MIT Press, Cambridge, MA, 1990.
Nathaniel Nystrom, Michael Clarkson, and AndrewC. Myers. Polyglot:An extensible compiler framework for Java. Technical Report 2002-1883, Computer Science Dept., Cornell University, 2002.
Greg Nelson, editor. Systems Programming with Modula-3. Prentice-Hall, 1991.
Chris Okasaki. Purely Functional Data Structures. Cambridge University Press, 1998. ISBN 0-521-63124-6.
Chris Okasaki. Views for Standard ML. InWorkshop on ML, pages 14–23, September 1998.
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.
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.
Zoltan Somogyi, Fergus Henderson, and Thomas Conway. The execution algorithm of Mercury: an efficient purely declarative logic programming language. Journal of Logic Programming, 29(1-3):17–64, October-December 1996.
Mark Tullsen. First-class patterns. In Proc. Practical Aspects of Declarative Languages, 2nd International Workshop (PADL), pages 1–15, 2000.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Liu, J., Myers, A.C. (2003). JMatch: Iterable Abstract Pattern Matching for Java. In: Dahl, V., Wadler, P. (eds) Practical Aspects of Declarative Languages. PADL 2003. Lecture Notes in Computer Science, vol 2562. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36388-2_9
Download citation
DOI: https://doi.org/10.1007/3-540-36388-2_9
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00389-2
Online ISBN: 978-3-540-36388-0
eBook Packages: Springer Book Archive