License: Creative Commons Attribution 4.0 International license (CC BY 4.0)
When quoting this document, please refer to the following
DOI: 10.4230/OASIcs.EVCS.2023.16
URN: urn:nbn:de:0030-drops-177865
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2023/17786/
Go to the corresponding OASIcs Volume Portal


Koppel, James

Typed Multi-Language Strategy Combinators

pdf-format:
OASIcs-EVCS-2023-16.pdf (0.8 MB)


Abstract

Strategy combinators (also called strategic programming) are a technique for modular program transformation construction invented by Bas Luttik and Eelco Visser, best known for their instantiation in the Stratego language. Traditional implementations are dynamically typed, and struggle to represent transformations that can be usefully applied to some types, but not all.
We present the design of our strategy-combinator library compstrat, a library for type-safe strategy combinators which run on Patrick Bahr’s compositional datatypes. We show how strategy combinators and compositional datatypes fuse elegantly, allowing the creation of type-preserving program transformations which operate only on datatypes satisfying certain properties. With this technique, it becomes possible to compactly define program transformations that operate on multiple programming languages. compstrat is part of the Cubix framework and has been used to build four program transformations, each of which operates on at least three languages.

BibTeX - Entry

@InProceedings{koppel:OASIcs.EVCS.2023.16,
  author =	{Koppel, James},
  title =	{{Typed Multi-Language Strategy Combinators}},
  booktitle =	{Eelco Visser Commemorative Symposium (EVCS 2023)},
  pages =	{16:1--16:9},
  series =	{Open Access Series in Informatics (OASIcs)},
  ISBN =	{978-3-95977-267-9},
  ISSN =	{2190-6807},
  year =	{2023},
  volume =	{109},
  editor =	{L\"{a}mmel, Ralf and Mosses, Peter D. and Steimann, Friedrich},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/opus/volltexte/2023/17786},
  URN =		{urn:nbn:de:0030-drops-177865},
  doi =		{10.4230/OASIcs.EVCS.2023.16},
  annote =	{Keywords: program transformation, strategic programming}
}

Keywords: program transformation, strategic programming
Collection: Eelco Visser Commemorative Symposium (EVCS 2023)
Issue Date: 2023
Date of publication: 21.03.2023
Supplementary Material: Software (Source Code): https://github.com/cubix-framework/cubix/tree/master/compstrat archived at: https://archive.softwareheritage.org/https://softwareheritage.org/swh:1:dir:710191ca2e67e6f922bccc5a9bbc1088699d618f


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI