gap-packages / guava

GAP package guava - computations relative to error-correcting codes
https://gap-packages.github.io/guava
Other
13 stars 7 forks source link

Obsoletes in GUAVA #7

Closed olexandr-konovalov closed 8 years ago

olexandr-konovalov commented 8 years ago

If one starts GAP with -O option, this shows that GUAVA uses many obsolete names - please see http://www.gap-system.org/Manuals/doc/ref/chap77.html on how to replace them.

===========================================
%%% Loading guava 3.12
#I  You may wish to install the xgap package
#I  and enjoy the graphic capabilities of SONATA.
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/codegen.gi line \
1042
    temp := MutableNullMat(n, n, F);
                          ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/matrices.gi line\
 24
    res := MutableNullMat(n+1,n+1);
                         ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/matrices.gi line\
 60
    result := MutableNullMat(M,n);
                            ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/matrices.gi line\
 176
        result := List(MutableNullMat(n,n)+1, x->ShallowCopy(x));
                                     ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/matrices.gi line\
 301
        res := MutableNullMat(q,q)+1;
                             ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/matrices.gi line\
 315
        res:=List([1..n], x-> MutableNullMat(q,q,GF(q)));
                                            ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/matrices.gi line\
 401
    res := MutableNullMat(r * m, n, Fq);
                         ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/bounds.gi line 5\
24
                    ReadPkg( "guava",  
                           ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/bounds.gi line 6\
76
        ReadPkg( "guava", "tbl/refs.g" );
               ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/bounds.gi line 6\
97
        ReadPkg( "guava", Concatenation( "tbl/bdtable", String(q), ".g" ) );
               ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/codecstr.gi line\
 576
    checkmat := MutableNullMat( 5 * 2^(m-2) - 1, 2 * m - 1, GF( 2 ) );
                              ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/codecstr.gi line\
 714
    checkmat := MutableNullMat( 7 * 2^(m-2) - 2, 2 * m, GF( 2 ) );
                              ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/codecstr.gi line\
 787
    checkmat := MutableNullMat( 2^v + 2^(r-v) - 3, r, GF( 2 ) );
                              ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/codecstr.gi line\
 891
    checkmat := MutableNullMat( 15 * 2^(m-3) - 3, 2*m, GF( 2 ) );
                              ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/codecstr.gi line\
 945
    theta := MutableNullMat( 4*size - 1, 2 * (m-3) + 2, GF( 2 ) );
                           ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/codecstr.gi line\
 1085
    checkmat := MutableNullMat( 23 * 2^(m-4) - 3, 2 * m - 1, GF( 2 ) );
                              ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/tblgener.gi line\
 100
            initialfile := Filename(LOADED_PACKAGES.guava, 
                                                   ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/tblgener.gi line\
 104
            initialfile := Filename(LOADED_PACKAGES.guava, 
                                                   ^
Syntax warning: Unbound global variable in /home/hudson/hudson/workspace/GAP-p\
kg-update-master-quicktest/GAPCOPTS/64build/GAPGMP/gmp/GAPTARGET/obsoletes/lab\
el/graupius/GAP-pkg-update-master-snapshot/pkg/guava-3.12/lib/tblgener.gi line\
 419
    file := Filename(LOADED_PACKAGES.guava,
                                    ^
[ "NRI", "bit_flip", "checksetI", "checksetJ", "expmulnr_gd", "expmulnrnr_gi",
  "grptfms_gd", "grptfms_gi", "guava_version", "libnr_gi", "nr_gd", "nr_gi" ]
### Loaded guava 3.12
===========================================
osj1961 commented 8 years ago

Replacing MutableNullMat and ReadPkg with up-to-date variants was easy. Not sure what to do with LOADED_PACKAGES.guava which currently gives a 3-elt list containing path, version num, and name: [ "/usr/local/lib/gap4r7/pkg/guava-3.13", "3.13", "GUAVA" ]

olexandr-konovalov commented 8 years ago

@osj1961 Thank you very much! I had a look at LOADED_PACKAGES in the referenced lines, for example in

    file := Filename(LOADED_PACKAGES.guava,
                     Concatenation("tbl/bdtable",String(q),".g") );

It will be very good to get rid of this, indeed, since as recently checked by @fingolfin, GUAVA is the only package that uses LOADED_PACKAGES - it should be replaced by GAPInfo.PackagesLoaded. Grepping for LOADED_PACKAGES reveals this:

lib/obsolete.gd:#V  LOADED_PACKAGES  - still used by GUAVA (01/2016)
lib/obsolete.gd:BindGlobal( "LOADED_PACKAGES", GAPInfo.PackagesLoaded );

However, I think in this situation using GAPInfo.PackagesLoaded is not the most optimal way - you should better use DirectoriesPackageLibrary (see here):

    file := Filename( DirectoriesPackageLibrary("guava", "tbl"),
                     Concatenation("bdtable",String(q),".g") );
osj1961 commented 8 years ago

Thanks to Alex Konovalov this issue is now closed. There is still a problem however: the bounds data is very out-of-date see issue #4