On Tue, May 14, 2024 at 02:07:28AM +0200, Waldek Hebisch wrote: > > Little extra info: if I force call to 'updateCategoryTable' I get > failure. If I load first 'UnivariatePuiseuxSeries' without > 'updateCategoryTable' and force 'updateCategoryTable' for other > loaded domains, then there is no failure. If I do 'updateCategoryTable' > _only_ for 'UnivariatePuiseuxSeries', then also there is no > failure. So, it seems that failure is related to multiple > calls to 'updateCategoryTable'
It seems that I found core trouble. There is huge search for possible operations. In this case "correct" operation is declared by RightModule. Float needs to be coerced to Expression(Float) and UnivariatePuiseuxSeries(Expression(Integer),x,0) to UnivariatePuiseuxSeries(Expression(Integer),x,0) Using fresh database )boot get_database(['UnivariatePuiseuxSeries, :'RightModule], 'HASCATEGORY) (EVAL-WHEN (:EXECUTE :LOAD-TOPLEVEL) (PROG () (RETURN (|get_database| (CONS '|UnivariatePuiseuxSeries| '|RightModule|) 'HASCATEGORY)))) Value = (((|#1|) . T) (((|Fraction| (|Integer|))) OR (|has| |#1| (|Algebra| (|Fraction| (|Integer|)))) (|has| |#1| (|Field|))) ((%) . T)) first position above, that is '((|#1|) . T)' means that UnivariatePuiseuxSeries unconditianlly has RightModule(#1), where #1 is first parameter to UnivariatePuiseuxSeries. Second position gives conditions for UnivariatePuiseuxSeries to have RightModule(Fraction(Integer)) and the third conditions for RightModule(%). From signature we need RightModule(Float), the first position gives RightModule(Expression(Integer)) and matching code resolves Float and Expression(Integer) to Expression(Float). This satisfies later checks and is OK. After 'updateCategoryTable' we get different list: Value = ((((|Fraction| (|Integer|))) OR (|has| |#1| (|Field|)) (|has| |#1| (|Algebra| (|Fraction| (|Integer|))))) ((%) . T) ((|#1|) . T)) So thist time consition for RightModule(Fraction(Integer)) is first. Again, we need RightModule(Float) and matching code resolves Fraction(Integer) and Float to Float. However, this fails later checks. So the core trouble is that search for signatures early commits to first plausible alternative. Exhaustive seach should try all possibilities, but this is not done. -- Waldek Hebisch -- 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 on the web visit https://groups.google.com/d/msgid/fricas-devel/ZkLZuJCQmW19gIZv%40fricas.org.