Ralf, On February 10, 2006 5:56 PM you wrote: > > > Anyone else want to help with this? :) See: > > > > http://wiki.axiom-developer.org/SandBoxAldorJetBundle > > http://wiki.axiom-developer.org/SandBoxAldorSparse > > > I am not sure whether this is an Aldor issue as such or just an > > Aldor/Axiom interface issue but one odd thing I see is the Aldor > > compiler complaining about the rather trivial macro: > > > > Sy ==> Symbol > > > I don't understand this yet. > > Try the additional compiler switch > -m no-mactext > and you will probably see a better source for the error. >
How can I set an Aldor compiler switch when compiling Aldor code in Axiom? > With the original JetBundle.as (why are you removing the empty > lines???) > I am not removing any lines. As you can see if you click 'edit' the difference is only apparent. It is an artifact of the formatting of the source that blank lines are removed. When adding the compiler features (both SPAD and Aldor) to Axiom Wiki, I had to struggle with the behaviour of the rest of the ZWiki/LatexWiki software that insists on applying Wiki-style structured text formatting rules to the SPAD and Aldor source code. I have been able to prevent most of this from happening but not all. So you can consider this a bug in the MathAction Axiom extensions of LatexWiki. > I get an error message > > aldor -mno-mactext -O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete > -DAxiom -Y $AXIOM/algebra -I ~/OTHER/Axiom JetBundle.as > #1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL' > "JetBundle.as", line 254: qsetelt!(mi, i, qelt(mi,i)+1) > .............................^ > [L254 C30] #2 (Error) Argument 1 of `qelt' did not match any possible > parameter type. > The rejected type is List(NonNegativeInteger). > Expected one of: > -- Vector(NonNegativeInteger) > -- List(PositiveInteger) > I guess you are running Aldor stand alone? How then do you integrate the compiler output with Axiom? > But in the code > r2m(ri:L PI):L NNI == > mi:L NNI := new(numIndVar()::NNI,0$NNI) > for i in ri repeat > i>nn => error errmsg1 > qsetelt!(mi, i, qelt(mi,i)+1) > mi > it is anyway bad that mi is a list. That is linear access time for > each element of ri. I guess, it's better to construct a vector, set > the elements and then turn the vector into a list. (I suspect that > a vector would be a better structure anyway for the purpose that > the returned value is used in other places of the code, but the > code is too unreadable for my taste.) Perhaps the difference in performance is not significant given the size of 'ri'? But I agree in general with your suggested change. > > I have tried, to replace "mi:L NNI" by "mi:V NNI", but that results > in > > "JetBundle.as", line 254: qsetelt!(mi, i, qelt(mi,i)+1) > .............................^ > [L254 C30] #2 (Error) Argument 1 of `qelt' did not match any possible > parameter type. > The rejected type is Vector(NonNegativeInteger). > Expected one of: > -- List(NonNegativeInteger) > -- List(PositiveInteger) > > That's interesting!!! > > The reason is that qelt$List(NNI) wants to have an Integer as > the second argument, but gets a PositiveInteger. Unfortunately, > I don't know so much of Axiom to know how to convert. It is no problem in both Axiom and Aldor, I think, to coerce a PI to an INT like this: qsetelt!(mi::Integer, i, qelt(mi,i)+1) > > I haven't found a definition for the "SubDomain" constructor that > appears in src/algebra/integer.spad. :-( > Like SubsetCategory, SubDomain is apparently a compiler primative. It is not defined in the "algebra" as such. I remarked on this recently in an email in another context: http://lists.nongnu.org/archive/html/axiom-developer/2006-02/msg00076.html See 'coerceSubset' in: http://wiki.axiom-developer.org/axiom--test--1/src/interp/CompilerBoot In the case of both SubsetCategory and SubDomain, the usage is very restricted in the Algebra library - they appear almost to be invented for this one purpose alone. But I presume that this sort of design has more or less carried over to Aldor, no? How does one define a sub-domain in Aldor? > > Bill, why do you translated something like the original > > macro Const == "Const"::Sy > > into a recursive definition > > macro Const == Const > > There are also some other places where you transformed > "1"::Sy into just 1. No, this is similar to the case of the blank lines above. It is an artifact of the formatting. ZWiki insists on treating text of the form "xxx":yyy as a link with xxx being the part of the link that is displayed and yyy being the url. I would like to get rid of this display problem but it will require some serious changes to the ZWiki/LatexWiki coding. Again, if you look at the actual source by clicking 'edit' you will see that there is no translation. The source is the same as in the original code. > > There are two problems here: > 1) The literal 1 is most probably not of type Symbol and thus > Aldor will return an error. > 2) You have not documented that you modified Seiler's > original code. So the history is lost. > No I did not modify Seiler's original code. It just looks like it if you only look at the web page and not the source code underneath. > It would be much better to split this huge code chunk into > several pieces and for each part explain why you have changed > what. Again, please note that I have not changed anything in the original code. > Do this even if you just want to make the code compile properly. Yes I agree that splitting it up is a good idea. This is what I did with the SPAD code. > > It would be even better to relate the code to the paper but that > is probably too much for the beginning. > Yes, I think this would be a great idea. If/when we get this code to compile, I think it would make a very good example of a literate program as a paper. I wonder if we can get the original LaTeX code for the paper from the author? Regards, Bill Page. _______________________________________________ Axiom-developer mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/axiom-developer
