> I do not think SubsetCategory implies that S itself belongs to > some other category. Rather, SubsetCategory means that elements > of S may by coerced to R without executing any code.
I don't think this is very important. More important is that it declares S to be a subset of R. That one cannot do by any other means. (In Aldor that is not expressible.) > Foo(S: Meet(Category(SubDomain(c_1,R)), Category(SubDomain(c_2,R)), > ...)) :... > > where you will need a infinite list of possible conditions. Not a good example for me. The category of SubDomain(X, p?) does not have anything to do with the category of X. Don't you agree? > Insted, you can write: > > Foo(S: SubsetCategory(R)):... I don't see the advantage of this. Suppose you define a Foo like this and now you are going to explicitly write the "add" part. Which functionality of S can you now actually use inside Foo? You always have to wrap things with if's like if S has AbelianGroup then ... because statically you (and the compiler) have no knowledge about the category of R. > The compile time cost comes from checking which signatures > are applicable to arguments: for each argument of a call you > need to check if domain of this argument is a subset of some > other domain. Such checks 99.999% of times say no, but > unfortunatly with naive implementation of symbol table > searches which give the 'no' answer are the most expensive > ones. Let me add that we search such information not only > for function calls but also when generating domanis/categries > or importing domains (in such cases we need to check if some > signature is more general than another one and this again > requires checking if function having argument of type T1 can > be applied to argument of type T2) and when searching for > coercions. I have optimized searches using hash table to > be able to quickly deliver 'no' answer, but while we got > nice speedup searches are still expensive (in particular > positive searches pay extra cost of hash table lookup). Let's get rid of SubsetCategory. See http://axiom-wiki.newsynthesis.org/SandBoxSubsetCategoryRemoved Ralf --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en -~----------~----~----~----~------~----~------~--~---
