Defmacro for C: Lightweight, Ad Hoc Code Generation

Selgrad K, Lier A, Wittmann M, Lohmann D, Stamminger M (2014)


Publication Language: English

Publication Type: Conference contribution, Original article

Publication year: 2014

Pages Range: 80-87

Conference Proceedings Title: Proceedings of ELS 2014 7th European Lisp Symposium

Event location: Paris FR

Abstract

We describe the design and implementation of CGen, a C code generator with support for Common Lisp-style macroexpansion. Our code generator supports the simple and efficient management of variants, ad hoc code generation to capture reoccurring patterns, composable abstractions as well as the implementation of embedded domain specific languages by using the Common Lisp macro system. We demonstrate the applicability of our approach by numerous examples from small scale convenience macros over embedded languages to real-world applications in high-performance computing.

Authors with CRIS profile

Related research project(s)

How to cite

APA:

Selgrad, K., Lier, A., Wittmann, M., Lohmann, D., & Stamminger, M. (2014). Defmacro for C: Lightweight, Ad Hoc Code Generation. In Verna, Didier (Eds.), Proceedings of ELS 2014 7th European Lisp Symposium (pp. 80-87). Paris, FR.

MLA:

Selgrad, Kai, et al. "Defmacro for C: Lightweight, Ad Hoc Code Generation." Proceedings of the 7th European Lisp Symposium, Paris Ed. Verna, Didier, 2014. 80-87.

BibTeX: Download