Shape-Constrained Array Programming with Size-Dependent Types
Research output: Chapter in Book/Report/Conference proceeding › Article in proceedings › Research › peer-review
Standard
Shape-Constrained Array Programming with Size-Dependent Types. / Bailly, Lubin; Henriksen, Troels; Elsman, Martin.
FHPNC 2023 - Proceedings of the 11th ACM SIGPLAN International Workshop on Functional High-Performance and Numerical Computing, Co-located with ICFP 2023. ed. / Gabriele Keller; Sam Westrick. Association for Computing Machinery, Inc., 2023. p. 29-41.Research output: Chapter in Book/Report/Conference proceeding › Article in proceedings › Research › peer-review
Harvard
APA
Vancouver
Author
Bibtex
}
RIS
TY - GEN
T1 - Shape-Constrained Array Programming with Size-Dependent Types
AU - Bailly, Lubin
AU - Henriksen, Troels
AU - Elsman, Martin
N1 - Publisher Copyright: © 2023 ACM.
PY - 2023
Y1 - 2023
N2 - We present a dependent type system for enforcing array-size consistency in an ML-style functional array language. Our goal is to enforce shape-consistency at compile time and allow nontrivial transformations on array shapes, without the complexity such features tend to introduce in dependently typed languages. Sizes can be arbitrary expressions and size equality is purely syntactical, which fits naturally within a scheme that interprets size-polymorphic functions as having implicit arguments. When non-syntactical equalities are needed, we provide dynamic checking. In contrast to other dependently typed languages, we automate the book-keeping involved in tracking existential sizes, such as when filtering arrays. We formalise a large subset of the presented type system and prove it sound. We also discuss how to adapt the type system for a real implementation, including type inference, within the Futhark programming language.
AB - We present a dependent type system for enforcing array-size consistency in an ML-style functional array language. Our goal is to enforce shape-consistency at compile time and allow nontrivial transformations on array shapes, without the complexity such features tend to introduce in dependently typed languages. Sizes can be arbitrary expressions and size equality is purely syntactical, which fits naturally within a scheme that interprets size-polymorphic functions as having implicit arguments. When non-syntactical equalities are needed, we provide dynamic checking. In contrast to other dependently typed languages, we automate the book-keeping involved in tracking existential sizes, such as when filtering arrays. We formalise a large subset of the presented type system and prove it sound. We also discuss how to adapt the type system for a real implementation, including type inference, within the Futhark programming language.
KW - functional programming
KW - parallel programming
KW - type systems
U2 - 10.1145/3609024.3609412
DO - 10.1145/3609024.3609412
M3 - Article in proceedings
AN - SCOPUS:85174071185
SP - 29
EP - 41
BT - FHPNC 2023 - Proceedings of the 11th ACM SIGPLAN International Workshop on Functional High-Performance and Numerical Computing, Co-located with ICFP 2023
A2 - Keller, Gabriele
A2 - Westrick, Sam
PB - Association for Computing Machinery, Inc.
T2 - 11th ACM SIGPLAN International Workshop on Functional High-Performance and Numerical Computing, FHPNC 2023, co-located with ICFP
Y2 - 4 September 2023
ER -
ID: 375210823