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.


Publié dans:
SCALA 2016 Proceedings of the 2016 7th ACM SIGPLAN Symposium on Scala
Présenté à:
SCALA 2016, Amsterdam, Netherlands, October 30 - 31, 2016
Année
2016
ISBN:
978-1-4503-4648-1
Mots-clefs:
Laboratoires:




 Notice créée le 2017-02-02, modifiée le 2018-03-17

n/a:
Télécharger le document
PDF

Évaluer ce document:

Rate this document:
1
2
3
 
(Pas encore évalué)