Towards size-dependent types for array programming

Research output: Chapter in Book/Report/Conference proceedingArticle in proceedingsResearchpeer-review

We present a type system for expressing size constraints on array types in an ML-style type system. The goal is to detect shape mismatches at compile-time, while being simpler than full dependent types. The main restrictions is that the only terms that can occur in types are array sizes, and syntactically they must be variables or constants. For those programs where this is not sufficient, we support a form of existential types, with the type system automatically managing the requisite book-keeping. We formalise a large subset of the type system in a small core language, which we prove sound. We also present an integration of the type system in the high-performance parallel functional language Futhark, and show on a collection of 44 representative programs that the restrictions in the type system are not too problematic in practice.

Original languageEnglish
Title of host publicationARRAY 2021 - Proceedings of the 7th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming, co-located with PLDI 2021
EditorsTze Meng Low, Jeremy Gibbons
Number of pages14
PublisherAssociation for Computing Machinery, Inc.
Publication date2021
Pages1-14
Article number3464310
ISBN (Electronic)978-1-4503-8466-7
DOIs
Publication statusPublished - 2021
Event7th ACM SIGPLAN International Workshop on Libraries, Languages, and Compilers for Array Programming, ARRAY 2021, held in association with PLDI 2021 - Virtual, Online, Canada
Duration: 21 Jun 2021 → …

Conference

Conference7th ACM SIGPLAN International Workshop on Libraries, Languages, and Compilers for Array Programming, ARRAY 2021, held in association with PLDI 2021
LandCanada
ByVirtual, Online
Periode21/06/2021 → …
SponsorACM SIGPLAN

Bibliographical note

Publisher Copyright:
© 2021 ACM.

    Research areas

  • functional programming, parallel programming, type systems

ID: 306899589