[Top][All Lists]

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

[Axiom-developer] Re: [Gcl-devel] Re: serveral bugs in codebase

From: Camm Maguire
Subject: [Axiom-developer] Re: [Gcl-devel] Re: serveral bugs in codebase
Date: 28 Jul 2003 11:04:54 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Hello again!

root <address@hidden> writes:

> Camm,
> The duplicate set issue test is:
> dom:=MonoidRing(Polynomial PrimeField 5, Permutation Integer)
> p:dom:=1
> set [p,p] ==> {1,1}
>   but should be
>           ==> {1}
> the other test is:
>   one? p  ==> false
> but should be
>           ==> true

OK, I think this has to do with the |output| in recordAndPrint in
i-toplevel being unbound.  In the default non-safety compile mode,
this is not checked for.  I replaced the form

(|output| |x'| |md'|))


(format t "output replace ~S ~S ~%" |x'| |md'|))

in i-toplevel.clisp, managed to compile the needed algebra files from
Juergen's tree by hand, and then get what I think is the proper
behavior, with reformatted output of course:

(1) -> dom:=MonoidRing(Polynomial PrimeField 5, Permutation Integer)

output replace (|MonoidRing| (|Polynomial| (|PrimeField| 5)) (|Permutation| 
(|Integer|))) (|Domain|) 
                                                                 Type: Domain
(2) -> p:dom:=1
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/PF.o for 
      domain PrimeField 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/PRIMES.o 
      for package IntegerPrimesPackage 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/SET.o for
      domain Set 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/POLY.o 
      for domain Polynomial 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/ALIST.o 
      for domain AssociationList 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/PERM.o 
      for domain Permutation 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/MRING.o 
      for domain MonoidRing 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/SMP.o for
      domain SparseMultivariatePolynomial 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/SUP.o for
      domain SparseUnivariatePolynomial 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/SAOS.o 
      for domain SingletonAsOrderedSet 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/UPMP.o 
      for package UnivariatePolynomialMultiplicationPackage 
   Loading /fix/t1/camm/axiom/axiom/new/new/int/algebra/IPF.NRLIB/code 
      for domain InnerPrimeField 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/TABLE.o 
      for domain Table 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/HASHTBL.o
      for domain HashTable 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/INTABL.o 
      for domain InnerTable 
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/ZMOD.o 
      for domain IntegerMod 

output replace (((0 . 1) . #<vector 0998e32c>)) (|MonoidRing| (|Polynomial| 
(|PrimeField| 5)) (|Permutation| (|Integer|))) 
                Type: MonoidRing(Polynomial PrimeField 5,Permutation Integer)
(3) -> set [p,p]
   Loading /fix/t1/camm/axiom/axiom/new/new/mnt/linux/algebra/FSAGG-.o 
      for domain FiniteSetAggregate& 

output replace #<vector 09fc0efc> (|Set| (|MonoidRing| (|Polynomial| 
(|PrimeField| 5)) (|Permutation| (|Integer|)))) 
            Type: Set MonoidRing(Polynomial PrimeField 5,Permutation Integer)
(4) -> one? p

output replace T (|Boolean|) 
                                                                Type: Boolean
(5) -> 

I can't yet see where |output| is supposed to be initialized.  All
occurrences I've found treat this symbol as a 'let-initialized'
local.  A similar situation appears to exist with the |data| variable
in define.boot.pamphlet.  Tim, what is the idea in these code

--% Result Output Printing

recordAndPrint(x,md) ==
  --  Prints out the value x which is of type m, and records the changes
  --  in environment $e into $InteractiveFrame
  --  $printAnyIfTrue  is documented in setvart.boot. controlled with )se me any
  if md = '(Any) and $printAnyIfTrue  then
    md' := first  x
    x' := rest x
    x' := x
    md' := md
  $outputMode: local := md   --used by DEMO BOOT
  mode:= (md=$EmptyMode => quadSch(); md)
  if (md ^= $Void) or $printVoidIfTrue then
    if null $collectOutput then TERPRI $algebraOutputStream
    if $QuietCommand = false then

      ^^^^^^  unbound function

  if $printTimeIfTrue or $printTypeIfTrue then printTypeAndTime(x',md')
  if $printStorageIfTrue then printStorage()
  if $printStatisticsSummaryIfTrue then printStatisticsSummary()
  if FIXP $HTCompanionWindowID then mkCompanionPage md
  $mkTestFlag = true => recordAndPrintTest md
  $runTestFlag =>
    $mkTestOutputType := md

compCapsuleItems(itemlist,$predl,$e) ==
  $TOP__LEVEL: local
  $myFunctorBody :local  := data    ---needed for translator

                            ^^^^  unbound variable
  $signatureOfForm: local
  $suffix: local:= 0
  for item in itemlist repeat $e:= compSingleCapsuleItem(item,$predl,$e)

Take care,

> As mentioned in a previous email Axiom stores its variable bindings
> in a "frame" which, internally is an alist stored in the variable
> |$InteractiveFrame|
> If you create the 'dom' variable above you can see it by doing:
> )lisp (pprint |$InteractiveFrame|)
> btw, you can type
> )lisp (setq $DALYMODE t)
> and then any line that begins with an open-paren at the Axiom
> prompt will be given directly to the lisp. e.g. after setting
> $dalymode above you can type:
> (pprint |$InteractiveFrame|)
> directly to the Axiom prompt. It makes lisp debugging easier.
> Tim
> address@hidden
> address@hidden
> _______________________________________________
> Gcl-devel mailing list
> address@hidden

Camm Maguire                                            address@hidden
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

reply via email to

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