Skip to main content

JMatch: Iterable Abstract Pattern Matching for Java

  • Conference paper
  • First Online:
Practical Aspects of Declarative Languages (PADL 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2562))

Included in the following conference series:

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.

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

    Article  Google Scholar 

  2. F.W. Burton and R. D. Cameron. Pattern matching with abstract data types. Journal of Functional Programming, 3(2):171–190, 1993.

    Article  MathSciNet  Google Scholar 

  3. K. Claessen and P. Ljungl. Typed logical variables in Haskell. In Haskell Workshop 2000, 2000.

    Google Scholar 

  4. Thomas A. Cormen, Charles E. Leiserson, and Ronald L. Rivest. Introduction to Algorithms. MIT Press, 1990.

    Google Scholar 

  5. Melvin E. Conway. Design of a separable transition-diagram compiler. Communications of the ACM, 6(7):396–408, 1963.

    Article  MATH  Google Scholar 

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

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

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

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

  10. James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, August 1996. ISBN 0-201-63451-1.

    Google Scholar 

  11. Steven Gregory. Parallel Programming in PARLOG. Addison-Wesley, 1987.

    Google Scholar 

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

  13. C. T. Haynes, D. P. Friedman, and M. Wand. Obtaining coroutines from continuations. Journal of Computer Languages, 11(3-4):143–153, 1986.

    Article  MATH  Google Scholar 

  14. Paul Hudak, Simon Peyton Jones, and Philip Wadler. Report on the programming language Haskell. SIGPLAN Notices, 27(5), May 1992.

    Google Scholar 

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

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

  17. John W. Lloyd. Programming in an integrated functional and logic programming language.Journal of Functional and Logic Programming, 3, March 1999.

    Google Scholar 

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

  19. Microsoft Corporation. Microsoft C# Language Specifications. Microsoft Press, 2001. ISBN 0-7356-1448-2.

    Google Scholar 

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

    Article  Google Scholar 

  21. Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. MIT Press, Cambridge, MA, 1990.

    Google Scholar 

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

  23. Greg Nelson, editor. Systems Programming with Modula-3. Prentice-Hall, 1991.

    Google Scholar 

  24. Chris Okasaki. Purely Functional Data Structures. Cambridge University Press, 1998. ISBN 0-521-63124-6.

    Google Scholar 

  25. Chris Okasaki. Views for Standard ML. InWorkshop on ML, pages 14–23, September 1998.

    Google Scholar 

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

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

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

    Article  MATH  Google Scholar 

  29. Mark Tullsen. First-class patterns. In Proc. Practical Aspects of Declarative Languages, 2nd International Workshop (PADL), pages 1–15, 2000.

    Google Scholar 

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

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics