Bill Page <[email protected]> writes: | On Mon, Oct 24, 2011 at 8:54 AM, Gabriel Dos Reis <[email protected]> wrote: | > ... | > Now, consider the capsule-level variable "power". It is declared as | > | > power:PrimitiveArray(%) | > | > then later assigned to as | > | > power := new(0,0) | > | > There are two lexical occurences of the literal '0' in there. Can you | > guess, which one is which? There are at least five interpretations for | > each constant: | > | > 0: R -- the parameter R satisfies Ring | > 0: Rep -- the parameter Rep satisfies UnivariatePolynomialCategory(R) | > 0: % -- the current domains satisfies same | > 0: NonNegativeInteger | > 0: Integer | > | > | > That this domain compiles at all is mysterious; it happens to depend on | > a very obscure implementation detail of AXIOM compilers, one that is not | > advertised at all -- and I don't think it should. | > It is voodoo. So, I am calling it Johannes's Rep voodoo :-). | > | | I think that originally in Axiom the assignment above would be treated | like this: | | power := new(Zero(),Zero()) | | So 0 would be resolved by the standard mechanism of function | selection, right?
That is correct. But, there is nothing special to selecting via function or anthing else -- in fact there are two routines in all AXIOM systems to do the selection; they all try very hard to do the same thing. However, how the selection in internally done is not the issue. It is what should be selected, and why. Because that is what is ultimatelly going to be explained to users. | I rather like this approach and sometimes wonder how | it could be extended to all constants. It is not the approach of selection (the compiler internal implementation) that is at issue. It is the meaning of that domain. Once we have established what the meaning should be, then we can see whether we can convince the compiler to do it. | If I understand correctly recently you have submitted some patches | that begin to remove the special treatment of constants 0 and 1 as | unary functions Zero and One. That is correct. 0 and 1 are not the only constants in the universe. One should be able to define 2 or 3 or red as constants too. And the selection mechanism should be the same. But, that isn't the issue here. The primary problem is: what is the representation of domains instantiated from ModMonic? | This seems to be going in the other direction. | | Comment? The issue has nothing to do with how the selection is being implemented; but what should be selected, and why. The real problem is: what is the representation domain of ModMonic? -- Gaby ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ open-axiom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/open-axiom-devel
