axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] non extending category


From: Ralf Hemmecke
Subject: Re: [Axiom-developer] non extending category
Date: Fri, 10 Feb 2006 23:55:57 +0100
User-agent: Thunderbird 1.5 (X11/20051201)

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.

With the original JetBundle.as (why are you removing the empty lines???)

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)

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.)

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.

I haven't found a definition for the "SubDomain" constructor that
appears in src/algebra/integer.spad. :-(


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.

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.

It would be much better to split this huge code chunk into several pieces and for each part explain why you have changed what. Do this even if you just want to make the code compile properly.

It would be even better to relate the code to the paper but that is probably too much for the beginning.

Ralf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]