Note that there is a very powerful library to implement mathematical rules 
in Python that uses its own syntax: MatchPy 
<https://matchpy.readthedocs.io/en/latest/>

We do have a way to connect SymPy to MatchPy 
<https://github.com/sympy/sympy/blob/ee24beaeb0ab73efea8123b70adfc6b7fb1756c8/sympy/utilities/matchpy_connector.py>
.

We also have an experimental compiler 
<https://github.com/symengine/symengine/tree/master/symengine/utilities/matchpycpp>
 
for MatchPy rules that generates C++ decision trees.

On Wednesday, February 8, 2023 at 2:02:44 p.m. UTC+1 syle...@gmail.com 
wrote:

> I have read about the article about how Photomath is developing their own 
> functional programming language in its step-by-step solver
>
>
> https://medium.com/photomath-engineering/advantages-of-using-functional-programming-in-photomath-step-by-step-solutions-e3909f899871
>
> Unfortunately, the article is not that much detailed about its technical 
> details,
> But I get the glimpse of the idea that 'immutability' and 'pure function' 
> is important in computer algebra system.
> And they point out that the problem about python (and maybe sympy) is, 
> that python is designed to be very 'dynamic' language, and if you program 
> everything semantically 'immutable' and 'pure', the python interpreter 
> won't recognize that and can't optimize the functional program written with 
> it because CPython assumes that your program is 'dynamic'.
>
> So they chose to develop their own functional DSL in C++. I'm not sure how 
> designing a DSL is useful for computer algebra systems despite it can give 
> freedom to choose syntax as convenient as possible, but the optimization 
> part is interesting for why true functional proramming language is needed.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/ac3a0010-9831-4984-9d97-b7d957ff4026n%40googlegroups.com.

Reply via email to