axiom-developer
[Top][All Lists]

## [Axiom-developer] Eval in Axiom/Aldor

 From: Antoine Hersen Subject: [Axiom-developer] Eval in Axiom/Aldor Date: Mon, 13 Nov 2006 14:44:26 -0800

Hello,

I am having some issue with the eval function, any ideas ?
I have reduced my problem to the simplest form.
It is making me crazy !!!

Because UP, which is a PolynomialCat, has InnerEvalable

PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
Category ==
Join(PartialDifferentialRing VarSet, FiniteAbelianMonoidRing(R, E),
Evalable %, InnerEvalable(VarSet, R),
InnerEvalable(VarSet, %), RetractableTo VarSet,
FullyLinearlyExplicitRingOver R)

What am I missing ?

Prog :

#include "axiom.as"

TestEval( x:Symbol , F:Field): with {}

import from UnivariatePolynomial(x,F) ;
import from Fraction UnivariatePolynomial(x,F) ;

test(a:Fraction UnivariatePolynomial(x,F)):Fraction UnivariatePolynomial(x,F) == {
eval(a, x, 1)
}

And here his the error message :

aldor -M no-abbrev -O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -Y \$AXIOM/algebra eval.as
#1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
"eval.as", line 11:                 eval(a, x, 1)
................^
[L11 C17] #2 (Error) No one possible return type satisfies the context type.
These possible return types were rejected:
-- Fraction(UnivariatePolynomial(x, F))
The context requires an _expression_ of type Fraction(UnivariatePolynomial(x, F)).
The following could be suitable if imported:
eval: (Fraction(UnivariatePolynomial(x, F)), Symbol pretend SetCategory, UnivariatePolynomial(x, F) pretend Type) -> Fraction(UnivariatePolynomial(x, F)) from Fraction(UnivariatePolynomial(x, F)), if UnivariatePolynomial(x, F) has InnerEvalable(Symbol, UnivariatePolynomial(x, F))

Thanks

Antoine Hersen
}