Polymorphic Types with Polynomial Sizes - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Conference Papers Year : 2023

Polymorphic Types with Polynomial Sizes

Abstract

This article presents a compile-time analysis for tracking the size of data-structures in a statically typed and strict functional language. This information is valuable for static checking and code generation. Rather than relying on depen- dent types, we propose a type-system close to that of ML: polymorphism is used to define functions that are generic in types and sizes; both can be inferred. This approach is con- venient, in particular for a language used to program critical embedded systems, where sizes are indeed known at compile- time. By using sizes that are multivariate polynomials, we obtain a good compromise between the expressiveness of the size language and its properties (verification, inference). The article defines a minimal functional language that is sufficient to capture size constraints in types. It presents its dynamic semantics, the type system and inference algorithm. Last, we sketch some practical extensions that matter for a more realistic language.
Fichier principal
Vignette du fichier
ARRAY-23-author-version.pdf (686.31 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-04491216 , version 1 (06-03-2024)

Identifiers

Cite

Jean-Louis Colaço, Baptiste Pauget, Marc Pouzet. Polymorphic Types with Polynomial Sizes. 9th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming (ARRAY 2023), Jun 2023, Orlando, United States. pp.36-49, ⟨10.1145/3589246.3595372⟩. ⟨hal-04491216⟩
9 View
13 Download

Altmetric

Share

Gmail Mastodon Facebook X LinkedIn More