Compiling pattern matching to in-place modifications - INRIA - Institut National de Recherche en Informatique et en Automatique Accéder directement au contenu
Communication Dans Un Congrès Année : 2021

Compiling pattern matching to in-place modifications

Résumé

Algebraic data types and pattern matching are popular tools to build programs manipulating complex datastructures in a safe yet efficient manner. On top of its safety advantages, compilation techniques can turn pattern matching into highly efficient deconstruction code for immutable use cases. Conversely, high-performance datastructures and languages prefer to leverage (controlled) mutations to maximize time and memory efficiency. Algebraic data types provide a natural framework to efficiently describe \emph{in-place} transformations as rewrite rules. Such representation coul take advantage of parallelism opportunities that appear in tree-like structures. We present early steps towards a new technique to compile pattern matching as parallel in-place modifications of the underlying memory representation. Towards this goal, we combine the usual language approach which is common in pattern-matching compilation with tools from the polyhedral model, which is commonly used in high-performance code generation to output efficient C code. We present our formalism, along with a prototype implementation.
Fichier principal
Vignette du fichier
gpce2021-cursors.pdf (573.75 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03355377 , version 1 (18-10-2021)

Identifiants

Citer

Paul Iannetta, Laure Gonnord, Gabriel Radanne. Compiling pattern matching to in-place modifications. GPCE 2021 - 20th International Conference on Generative Programming: Concepts & Experiences, Oct 2021, Chicago & Virtual, United States. ⟨10.1145/3486609.3487204⟩. ⟨hal-03355377⟩
224 Consultations
182 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More