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.


Editor(s):
Biboudis, A
Jonnalagedda, M
Stucki, S
Ureche, V
Published in:
Scala'16: Proceedings Of The 2016 7Th Acm Sigplan Symposium On Scala, 61-64
Presented at:
7th ACM SIGPLAN Symposium on Scala, Amsterdam, NETHERLANDS, OCT 30-31, 2016
Year:
2016
Publisher:
New York, Assoc Computing Machinery
ISBN:
978-1-4503-4648-1
Keywords:
Laboratories:




 Record created 2017-01-24, last modified 2018-09-13


Rate this document:

Rate this document:
1
2
3
 
(Not yet reviewed)