A generic algorithm for checking exhaustivity of pattern matching
Algebraic data types and pattern matching are key features of functional programming languages. Exhaustivity checking of pattern matching is a safety belt that defends against unmatched exceptions at runtime and boosts type safety. However, the presence of language features like inheritance, typecase, traits, GADTs, path-dependent types and union types makes the checking difficult and the algorithm complex. In this paper we propose a generic algorithm that decouples the checking algorithm from specific type theories. The decoupling makes the algorithm simple and enables easy customization for specific type systems.
WOS:000390845300007
2016
978-1-4503-4648-1
61
64
REVIEWED
EPFL
Event name | Event place | Event date |
Amsterdam, Netherlands | October 30 - 31, 2016 | |