Conference proceeding
Metaprogramming with combinators
Proceedings of the 20th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, pp 43-54
17 Oct 2021
Abstract
There are a wide array of methods for writing code generators. We advocate for a point in the design space, which we call metaprogramming with combinators, where programmers use (and write) combinator libraries that directly manipulate object language terms. The key language feature that makes this style of programming palatable is quasiquotation. Our approach leverages quasiquotation and other host language features to provide what is essentially a rich, well-typed macro language. Unlike other approaches, metaprogramming with combinators allows full control over generated code, thereby also providing full control over performance and resource usage. This control does not require sacrificing the ability to write high-level abstractions. We demonstrate metaprogramming with combinators through several code generators written in Haskell that produce VHDL targeted to Xilinx FPGAs.
Metrics
7 Record Views
Details
- Title
- Metaprogramming with combinators
- Creators
- Mahshid Shahmohammadian - Drexel UniversityGeoffrey Mainland - Drexel University
- Publication Details
- Proceedings of the 20th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, pp 43-54
- Conference
- GPCE '21: Concepts and Experiences (2021)
- Series
- ACM Conferences
- Publisher
- ACM
- Resource Type
- Conference proceeding
- Language
- English
- Academic Unit
- Computer Science (Computing)
- Scopus ID
- 2-s2.0-85120854564
- Other Identifier
- 991021868722704721