Francesco Bonazzi

Results 103 comments of Francesco Bonazzi

The main problem is the usage of lambdas. When you generate the decision tree you can't find the definitions, IIRC.

On SymPy. By the way, the rules will probably need support for C++20 if ported to C++.

Yes, it takes a `ManyToOneMatcher` object as input and generates the decision tree. It's not thoroughly tested, I fixed a bug earlier this year.

The links are correct. Currently SymPy defines a `ManyToOneReplacer` object, the replacement rules are lambdas. They need to be transformed into proper functions. There are a few issues and the...

The code generator works with `ManyToOneMatcher`, not with the replacer.

For your information: https://github.com/Upabjojr/rubi_generated

> @Upabjojr, do you know if the decision tree generated could be modified to output something like: Do you mean the decision tree generated by MatchPy? The code follows the...

It's subclassing _MatchPy_'s `CodeGenerator` object in order to do some customizations of the generated code. > ```python > def generated_rule(b, n, x): > if (ZeroQ(n+S(1))): > return replacement2(b, n, x)...

Well, I'm not sure it can be generated like that because it is missing all the logic to match the elements of the expression tree.

By the way, I feel that the decision tree is being generated more complicated than what it ought be. Incidentally, I believe it's an issue of replication of objects in...