On 5/22/26 10:09 PM, Waldek Hebisch wrote:
> 
> Representation of derivatives needs a dummy.  Kernels may
> be nested and we sometimes need to substitute for dummies.
> Old code in few other places (not this one) tried to use
> the same dummy and this led to obscure bugs.  Those bugs
> were fixed by consistently using new dummies.
> 
> Need for distinct dummies may be unobvious and people believed
> that reusing dummy is safe, but it is easy to overlook some
> special case.  So, I very much prefer current state, that
> is consistently using new dummies.
> 

That code has remained the same since the beginning of FriCAS,
so at least unchanged for 20 years, maybe 40 years.

I believe with the introduction of encode_diff/decode_diff,
this usage of new dummy is no longer needed.

In encode_diff, for high order derivatives, same dummy symbols
are reused.  If certain rules are followed (i.e alpha
substitution), then transformation of (%diff) kernel will not
mess things up.

For making changes safe, we can add some assertions there.

- Qian

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/06ad9fe1-a744-49c9-818f-a5347973afcd%40gmail.com.

Reply via email to