axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] sorry for bothering and a small patch


From: u1204
Subject: Re: [Axiom-developer] sorry for bothering and a small patch
Date: Thu, 14 Mar 2013 15:00:16 -0400

> First, there is a misspelling in my email address. Second, there
> is a misspelling in bookvol0 and bookvol1.

Sorry. I will fix this.

Also I was unclear about your name format. I believe that the family name
comes first in Asian names (so I would be Daly Tim) but I took a 
guess based on your email address. Did I get it the way you prefer?



> I noticed that you have changed the buglist, is there something I
> can do?

The work you are doing to read and fix the books is valuable.



I reviewed the console output, collected all of the compiler
complaints, and added them to the buglist. There are duplicate
entries because I have done this before. This time I tried to
classify them into categories.

The easiest ones to fix are those marked

   "should replace by @"

Generally what this means is that someone wrote something like:
     
==============================================================
warnings 20542:

>compiling ITAYLOR.spad to ITAYLOR.nrlib

  Warnings:
    [1] series: pretend$ == should replace by @
    [2] := st has no value

The problem is to fix item [1]. What the compiler is complaining
about is that 'pretend' is a way of telling the compiler to 
"trust me, I know this is right" 

but the compiler knows how to coerce correctly. 

To find out what the problem is, first start Axiom and type

   )show ITAYLOR
   ......
   Issue )edit bookvol10.3.pamphlet to see algebra source code for ITAYLOR

so you know that ITAYLOR.spad is in bookvol10.3.pamphlet

If you edit this file and search for

   )abbrev domain ITAYLOR

you find the domain. The domain has 2 parts, the list of exported
functions and the implementation of those functions. The 
implementation happens after the word "add"

There we find the defintion (axiom definitions start with "=="

   stream x == x pretend %

The compiler knows from the export definition line that 

  stream: Stream Coef -> %

means that the function series takes a "Stream Coef" and 
returns an ITAYLOR thing. It also knows, from the line,

   Rep := Stream Coef

that ITAYLOR things are represented by Stream Coef objects.

When the compiler sees:

   stream x == x pretend %

it already knows that it can coerce the argument to stream correctly.
It does not need to "pretend" and it does not need to "trust us".

So you have to take several steps to fix this:

    1) verify that the problem occurs in the latest build
    2) isolate ITAYLOR as ITAYLOR.spad
    3) compile ITAYLOR to see the error message
    4) change the line
    5) recompile ITAYLOR to see the message is gone
    6) make the change in bookvol10.3.pamphlet/ITAYLOR
    7) rebuild Axiom
    8) check that the problem is gone in the build
    9) create a diff -Naur patch
   10) post it to the mailing list or send it to me

In detail:
================================================================
    1) verify that the problem occurs in the latest build
================================================================

   git clone git://github.com/daly/axiom.git silver
   cd silver
   export AXIOM=`pwd`/mnt/ubuntu
   export PATH=$AXIOM/bin:$PATH
   time make NOISE= TESTSET=regresstests
      ... scan output for ITAYLOR
      ... look for 
        Warnings:
          [1] series: pretend$ == should replace by @
          [2] := st has no value

(This way you know that the error still exists in the latest build
and has not been fixed)

================================================================
    2) isolate ITAYLOR as ITAYLOR.spad
================================================================

edit bookvol10.3.pamphlet. search for

   )abbrev domain ITAYLOR

clip the code between \begin{chunk} and \end{chunk}
put it into a file called ITAYLOR.spad

(This way you have an isolated case where you can easily 
reproduce the error)

================================================================
    3) compile ITAYLOR to see the error message
================================================================

   axiom -nox
   )co ITAYLOR
      ... scan output for ITAYLOR
      ... look for 
        Warnings:
          [1] series: pretend$ == should replace by @
          [2] := st has no value

(Now you can reproduce the error and make sure you fixed it)

================================================================
    4) change the line
================================================================

change

   stream x == x pretend %

to

   stream x == x @ %

================================================================
    5) recompile ITAYLOR to see the message is gone
================================================================

   axiom -nox
   )co ITAYLOR
      ... scan output for ITAYLOR
      ... look for 
        Warnings:
          [1] := st has no value

(Now you fixed the error)

================================================================
    6) make the change in bookvol10.3.pamphlet/ITAYLOR
================================================================

edit bookvol10.3.pamphlet
search for 
   )abbrev domain ITAYLOR
find the line that reads:

   stream x == x pretend %

and change it to

   stream x == x @ %

================================================================
    7) rebuild Axiom
================================================================

   cd silver
   export AXIOM=`pwd`/mnt/ubuntu
   export PATH=$AXIOM/bin:$PATH
   make clean
   time make NOISE= TESTSET=regresstests

================================================================
    8) check that the problem is gone in the build
================================================================

   ... scan output for ITAYLOR
   ... look for 
     Warnings:
       [1] := st has no value

(Now you know the fix to bookvol10.3.pamphlet worked)

================================================================
    9) create a diff -Naur patch
================================================================

   cd silver
   git diff >20130314.01.jzc.patch

(Note that patch names are written as
   year          2013
   month             03
   day                 14
   increment             .01
   author                   .jzc
   type                         .patch

but you can use any name you like)

================================================================
   10) post it to the mailing list or send it to me
================================================================

cat 20130314.01.jzc.patch | mail -s "20130314.01.jzc.patch" -c
address@hidden address@hidden 

Tim









reply via email to

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