[Aldor-l] Problem with extending SparseUnivariatePolynomial0
W Naylor
wn at cs.bath.ac.uk
Thu Mar 23 07:13:34 EST 2006
Hi,
I find that I have problems with extending the domains
SparseUnivariatePolynomial0 and UnivariateMonomial.
If I compile a file tst.as containing:
--------------------------------------
#include "algebra"
extend SparseUnivariatePolynomial0(R:Join(ArithmeticType, ExpressionType),
var:Symbol == new()):with {
foo : String -> String
} == add {
foo(s:String):String == s
}
---------------------------------------
with:
aldor -Fo -Fao tst.as
(the function foo is just dummy, in fact I get the same behaviour if I
leave it out -- effectively doing a null extension!)
now I try to create a SparseUnivariatePolynomial0 object, first compile
the file use.as:
--------------------------------------
#include "algebra"
#include "aldorio"
#library SUP "tst.ao"
import from SUP;
import from Symbol,Integer;
macro x== -"x";
import from SparseUnivariatePolynomial0(Integer,x);
stdout<<" blah"<<newline;
monomial 2
--------------------------------------
with:
aldor -Fao -Fo use.as
aldor -Fx -lalgebra -laldor use.o tst.o
now I go:
>./use
> blah
>Segmentation fault
can any-one explain what is happening?
cheers,
Bill
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
-
- Dr. W.A. Naylor
-
- http://www.cs.bath.ac.uk/~wn
- http://orcca.on.ca/~bill
-
- work tel: +44 1225 386183
-
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
More information about the Aldor-l
mailing list