Year: 2015
Type: conference-paper
Abstract: The preprocessor of the C language provides a convenient base to define relatively complex source-to-source transformations.However, writing and understanding these macros is usually fairly difficult.Lack of typing, statelessness, and uncommon syntax are the main reasons of this difficulty.To support the development of preprocessor metaprograms, a model for each of the macros can be implemented with a function in a purely functional language.If only a well-defined, restricted set of the language is used, then a working functional implementation can be translated back into a preprocessor metaprogram.This translation leads to easily recognizable patterns in the resulting code, thus makes its maintenance and understanding easier.Furthermore, testing and prototyping may need less effort using an initial implementation in a functional language.
Author: Máté Karácsony
Institution: Eötvös Loránd University
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Open Access status: bronze
OpenAlex ID: W2325969264
