On Tue, May 02, 2023 at 04:36:09PM +0200, Ralf Hemmecke wrote:
> > > I guess I also shouldn't rely on the current behaviour of the SPAD
> > > compiler,
> > > right?
>
> > IIRC rules are: domain inheritance first, then tree of categories with
> > depth-first search where order of arguments to Join gives order
> > on parents.
>
> Yes and the Join makes everything basically unpredictable for a user.
> Clearly, the compiler has its rules, but as a user one gets surprises when
> one expects one thing but the rules actually tell something else.
> And why it should be left unspecified is, because one can have default
> implementations in different categories and joins them, if there is
> overlapping the rules may give you a definite implementation, but maybe not
> the one that one would actually like.
>
> I remember that long time ago I wanted to put lots of things into category
> defaults, because then one could have inheritance from multiple "domains".
> That works well as long as nothing overlaps. But overlapping usually happens
> quite soon. So one has to find the right balance for what to implement and
> what not. Category defaults should definitely not be (ab)used to achieve
> multiple inheritance.
Well, multiple inheritance should not be abused. And implementaions
giving significantly different results counts as abuse (OK for
testing, but not for normal use). OTOH if down linear chain we
have enough conditions to use more efficient implementation,
then search should reliably pick later version.
> > Look at (sub)chapter 14.2.2 in the FriCAS book, there is part
> > about search path. Also, Daventport article about Schratchpas II
> > design gives a lot of details.
>
> Well, I did and realized that the content does not agree with reality.
> Or maybe I am not smart enough to find a button labelled "Linage". Grepping
> through the FriCAS sources doesn't find anything for "Lineage".
I not sure why you write about "Lineage". AFAICS it is not present
regardless if you look at code or documentation.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/20230502153750.pbkzqxpx7lnxs4y4%40fricas.math.uni.wroc.pl.