Practical Aspects of Declarative Languages

Volume 2562 of the series Lecture Notes in Computer Science pp 110-127


JMatch: Iterable Abstract Pattern Matching for Java

  • Jed LiuAffiliated withComputer Science Department, Cornell University
  • , Andrew C. MyersAffiliated withComputer Science Department, Cornell University

* Final gross prices may vary according to local VAT.

Get Access


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.