TY - JOUR
T1 - Type Soundness for Path Polymorphism
AU - Viso, Andrés
AU - Bonelli, Eduardo
AU - Ayala-Rincón, Mauricio
N1 - Publisher Copyright:
© 2016 The Author(s)
PY - 2016/7/11
Y1 - 2016/7/11
N2 - Path polymorphism is the ability to define functions that can operate uniformly over arbitrary recursively specified data structures. Its essence is captured by patterns of the form xy which decompose a compound data structure into its parts. Typing these kinds of patterns is challenging since the type of a compound should determine the type of its components. We propose a static type system (i.e. no run-time analysis) for a pattern calculus that captures this feature. Our solution combines type application, constants as types, union types and recursive types. We address the fundamental properties of Subject Reduction and Progress that guarantee a well-behaved dynamics. Both these results rely crucially on a notion of pattern compatibility and also on a coinductive characterisation of subtyping.
AB - Path polymorphism is the ability to define functions that can operate uniformly over arbitrary recursively specified data structures. Its essence is captured by patterns of the form xy which decompose a compound data structure into its parts. Typing these kinds of patterns is challenging since the type of a compound should determine the type of its components. We propose a static type system (i.e. no run-time analysis) for a pattern calculus that captures this feature. Our solution combines type application, constants as types, union types and recursive types. We address the fundamental properties of Subject Reduction and Progress that guarantee a well-behaved dynamics. Both these results rely crucially on a notion of pattern compatibility and also on a coinductive characterisation of subtyping.
KW - Path Polymorphism
KW - Pattern Matching
KW - Static Typing
KW - λ-Calculus
UR - http://www.scopus.com/inward/record.url?scp=84995686709&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84995686709&partnerID=8YFLogxK
U2 - 10.1016/j.entcs.2016.06.015
DO - 10.1016/j.entcs.2016.06.015
M3 - Article
AN - SCOPUS:84995686709
SN - 1571-0661
VL - 323
SP - 235
EP - 251
JO - Electronic Notes in Theoretical Computer Science
JF - Electronic Notes in Theoretical Computer Science
ER -