Optimising First-Class Pattern Matching

J. Smits*, Toine Hartman, Jesper Cockx

*Corresponding author for this work

Research output: Chapter in Book/Conference proceedings/Edited volumeConference contributionScientificpeer-review

28 Downloads (Pure)

Abstract

Pattern matching is a high-level notation for programs to analyse the shape of data, and can be optimised to efficient low-level instructions. The Stratego language uses first-class pattern matching, a powerful form of pattern matching that traditional optimisation techniques do not apply to directly.
In this paper, we investigate how to optimise programs that use first-class pattern matching. Concretely, we show how to map first-class pattern matching to a form close to traditional pattern matching, on which standard optimisations can be applied.
Through benchmarks, we demonstrate the positive effect of these optimisations on the run-time performance of Stratego programs. We conclude that the expressive power of first-class pattern matching does not hamper the optimisation potential of a language that features it.
Original languageEnglish
Title of host publicationSLE 2022: Proceedings of the 15th ACM SIGPLAN International Conference on Software Language Engineering
Place of PublicationNew York
PublisherAssociation for Computing Machinery (ACM)
Pages74-83
Number of pages10
ISBN (Print)978-1-4503-9919-7
DOIs
Publication statusPublished - 2022
EventThe 15th ACM SIGPLAN International Conference on Software Language Engineering - Auckland , New Zealand
Duration: 6 Dec 20227 Dec 2022
Conference number: 15th

Conference

ConferenceThe 15th ACM SIGPLAN International Conference on Software Language Engineering
Abbreviated titleSLE 2022
Country/TerritoryNew Zealand
CityAuckland
Period6/12/227/12/22

Keywords

  • pattern matching
  • optimisation
  • strategic programming

Fingerprint

Dive into the research topics of 'Optimising First-Class Pattern Matching'. Together they form a unique fingerprint.

Cite this