HPAC / matchpy

A library for pattern matching on symbolic expressions in Python.
MIT License
164 stars 25 forks source link

[DON'T MERGE] Initial draft for C++ code generator #51

Closed Upabjojr closed 5 years ago

Upabjojr commented 5 years ago

This is an initial draft for a code generator targeting the C++ language. It is meant to work with SymEngine expressions.

The final purpose is to compile the Rubi rules by first translating them into C++.

The generated decision tree is split into multiple sub-blocks. I use C++ function pointers to simulate a Python generator (apparently coroutines are scheduled to be introduced in C++20, so not yet available).

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-14.4%) to 82.083% when pulling 9be1181924529ed879d8583cc7dd8db9843c0c91 on Upabjojr:cpp_code_generator into 90a0cd1cb2d23d1767cd49ed85d4a57571d3bcf8 on HPAC:master.

certik commented 5 years ago

I think that it will not be difficult to change this generator once future features of C++ are introduced. So I think this is a good start.

Upabjojr commented 5 years ago

I am closing this PR in favour of https://github.com/symengine/symengine/pull/1497