Liu, Fengyun2017-02-022017-02-022017-02-02201610.1145/2998392.2998401https://infoscience.epfl.ch/handle/20.500.14299/134137WOS:000390845300007Algebraic 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.pattern matchingexhaustivity checkScalaA generic algorithm for checking exhaustivity of pattern matchingtext::conference output::conference proceedings::conference paper