Meta-programming with Maple and C
We show how to use Maple as a source language for meta-programming, with C being the target language, for experimenting with and solving combinatorial problems. We will illustrate this approach with toy problems, as well as with more substantial projects. In the latter case, familiarity with basic concepts from compiler theory may be advantageous to the reader. One advantage of using Maple as a source language for meta-programming for combinatorial problems, lies in the fact that we can use Maple’s symbolic engine to perform complicated manipulations of mathematical objects fast and reliably and therefore produce easily bug-free code in the target language. Another advantage is that we can use Maple’s underlying powerful programming language, including functions, procedures and modules, to create a meta-program that is easy to debug, modify and maintain. The target language can be changed to any other language the user is acquainted and/or at ease with, for example Java, Perl, Python, MPI and so forth. The approach we advocate can be used for both educational and research purposes.
Authors
- Ilias Kotsireas (ORCID: https://orcid.org/0000-0003-2126-8383)
Institutions
- Wilfrid Laurier University (CA)
Publication Details
- Journal
- Maple Transactions
- Published
- 2025-02-23
- DOI
- https://doi.org/10.5206/mt.v5i1.21835
- Citations
- 1
- Primary Topic
- Distributed and Parallel Computing Systems
- Type
- article
- Field-Weighted Citation Impact
- 1.49