I have now removed most uses of Kernel(AlgebraicNumber).  But
remaining ones (in AlgebraicNumber) are more tricky: if I remove
several exported functions and no longer export ExpressionSpace,
then AlgebraicNumber compiles, but lacks important
functionality.

Thanks. I have also rewriten my code and now construct kernels as Kernel(Expression Integer). That solved all my issues as far as I can see.

Obviously, if in AlgebraicNumber functions are called that are inherited from the Expression Integer representation, I think there is anyway no issue, because of the way inheritance works. (OK, that means, as far as I believe it works.) So if in those functions kernels are created they are automatically Kernel(Expression(INT)) and the inheritance mechanism then just claims/pretends that thes kernel are in Kernel(AN).

Problem comes if a user create a Kernel(AN) element that is not actually an element of Kernel(Expression(INT)) that is pretended to be Kernel(AN).

So for the particular case of AN, maybe Kernal(X) checks whether X is AN and den does the kernel creation via Expression(INT). Maybe this would work, but I would find this very, very bad design if the Kernel constructor has to know about AN and Expression(INT) explicitly and thus, do certainly NOT support such an approach.

In fact, I find it a bit strange that in the design of AN it was decided to internally build on Kernel(Expression(INT)). Well, maybe it was not decided, but just happened (for most of the cases), because many functions from ExpressionSpace are just inherited from Rep:=Expression(INT).

A tricky issue, indeed.

Ralf

--
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/89e786c8-eb2c-45e2-957d-f7bea909633f%40hemmecke.org.

Reply via email to