Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Bib Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

77 Replaced and Removed Command Names
 77.1 Group Actions – Name Changes
 77.2 Package Interface – Obsolete Functions and Name Changes
 77.3 Normal Forms of Integer Matrices – Name Changes
 77.4 Miscellaneous Name Changes or Removed Names
 77.5 The former .gaprc file
 77.6 Semigroup properties

77 Replaced and Removed Command Names

In general we try to keep GAP 4 compatible with former releases as much as possible. Nevertheless, from time to time it seems appropriate to remove some commands or to change the names of some commands or variables. There are various reasons for that: Some functionality was improved and got another (hopefully better) interface, names turned out to be too special or too general for the underlying functionality, or names are found to be unintuitive or inconsistent with other names.

In this chapter we collect such old names while pointing to the sections which explain how to substitute them. Usually, old names will be available for several releases; they may be removed when they don't seem to be used any more.

Information about obsolete names is printed by Info (7.4-6) using the InfoObsolete (77.4-1) Info class. By default InfoObsolete (77.4-1) is set to 1. Newly obsoleted identifiers should at first be outputted at info level 2. Once they have been removed from all packages, they should then be moved to info level 1, so they are visible to normal users, for at least one major release before being removed.

The functions DeclareObsoleteSynonym and DeclareObsoleteSynonymAttr take an optional final parameter, specifying the info level at which the given obsolete symbol should be reported. It defaults to 2 and 1, respectively.

The obsolete GAP code is collected in two library files, lib/obsolete.gd and lib/obsolete.gi. By default, these files are read when GAP is started. It may be useful to omit reading these files, for example in order to make sure that one's own GAP code does not rely on the obsolete variables. For that, one can use the -O command line option (see 3.1) or set the component ReadObsolete in the file gap.ini to false (see 3.2). Note that -O command line option overrides ReadObsolete.

(Note that the condition whether the library files with the obsolete GAP code shall be read has changed. In GAP 4.3 and 4.4, the global variables GAP_OBSOLESCENT and GAPInfo.ReadObsolete –to be set in the user's .gaprc file– were used to control this behaviour.)

77.1 Group Actions – Name Changes

The concept of a group action is sometimes referred to as a group operation. In GAP 3 as well as in older versions of GAP 4 the term Operation was used instead of Action. We decided to change the names to avoid confusion with the term operation as in DeclareOperation (78.1-5) and operations for Xyz.

Here are some examples of such name changes.

OLD NOW USE
Operation Action (41.7-2)
RepresentativeOperation RepresentativeAction (41.6-1)
OperationHomomorphism ActionHomomorphism (41.7-1)
FunctionOperation FunctionAction (41.12-4)
IsLexicographicallyLess \< (31.11-1)

77.2 Package Interface – Obsolete Functions and Name Changes

With GAP 4.4 the package interface was changed. Thereby some functions became obsolete and the names of some others were made more consistent.

The following functions are no longer needed: DeclarePackage, DeclareAutoPackage, DeclarePackageDocumentation and DeclarePackageAutoDocumentation. They are substituted by entries in the packages' PackageInfo.g files, see 76.3-15.

Furthermore, the global variable PACKAGES_VERSIONS is no longer needed, since this information is now contained in the GAPInfo.PackagesInfo record (see 3.5-1). The global variable Revisions is also no longer needed, since the function DisplayRevision was made obsolete in GAP 4.5 and removed in GAP 4.7.

The following function names were changed.

OLD NOW USE
RequirePackage LoadPackage (76.2-1)
ReadPkg ReadPackage (76.3-1)
RereadPkg RereadPackage (76.3-1)

77.3 Normal Forms of Integer Matrices – Name Changes

Former versions of GAP 4 documented several functions for computing the Smith or Hermite normal form of integer matrices. Some of them were never implemented and it was unclear which commands to use. The functionality of all of these commands is now available with NormalFormIntMat (25.2-9) and a few interface functions.

77.4 Miscellaneous Name Changes or Removed Names

In former releases of GAP 4 there were some global variable names bound to general information about the running GAP, such as path names or command line options. Although they were not officially documented they were used by several users and in some packages. We mention here BANNER and QUIET. This type of information is now collected in the global record GAPInfo (3.5-1).

Here are some further name changes.

OLD NOW USE
MonomialTotalDegreeLess MonomialExtGrlexLess (66.17-14)
MultRowVector MultVectorLeft (23.4-3)
MutableCopyMat MutableCopyMatrix (26.11-4)
MutableIdentityMat IdentityMat (24.5-1)
MutableNullMat NullMat (24.5-2)
NormedVectors NormedRowVectors (61.9-11)
RadicalGroup SolvableRadical (39.12-9)

77.4-1 InfoObsolete
‣ InfoObsolete( info class )

is an info class to display warnings when an obsolete variable is used. By default, the info level for this class is set to 1, which will only show variables which will be removed in the next major version of GAP. Setting it to 2 will trigger further warnings, for variables which have alternative names, or may be removed in future. This class can be set to 0 to disable all obsolete warnings.

To check that the GAP code does not use any obsolete variables at parsing time, and not at a runtime, use the -O command line option, see 3.1.

77.5 The former .gaprc file

Up to GAP 4.4, a file .gaprc in the user's home directory (if available, and GAP was started without -r option) was read automatically during startup, early enough for influencing the autoloading of packages and late enough for being allowed to execute any GAP code. On Windows machines this file was called gap.rc.

In GAP 4.5 the startup mechanism has changed, see 3.2 for details. These new configuration files are now contained in a directory GAPInfo.UserGapRoot.

For the sake of partial backwards compatibility, also the former file ~/.gaprc is still supported for such initializations, but this file is read only if the directory GAPInfo.UserGapRoot does not exist. In that case the ~/.gaprc is read at the same time as gaprc would be read, i. e., too late for influencing the startup of GAP.

As before, the command line option -r disables reading ~/.gaprc, see 3.1.

To migrate from the old setup to the new one introduced with GAP 4.5, first have a look at the function WriteGapIniFile (3.2-3). Many users will find that all or most of what was set in the old ~/.gaprc file can now be done via the user preferences in a gap.ini file. If you had code for new functions or abbreviations in your old ~/.gaprc file or you were reading additional files, then move this into the file gaprc (without the leading dot, same name for all operating systems) in the directory GAPInfo.UserGapRoot.

77.6 Semigroup properties

Until Version 4.8 of GAP there was inconsistent use of the following properties of semigroups: IsGroupAsSemigroup, IsMonoidAsSemigroup, and IsSemilatticeAsSemigroup. IsGroupAsSemigroup was true for semigroups that mathematically defined a group, and for semigroups in the category IsGroup (39.2-7); IsMonoidAsSemigroup was true for semigroups that mathematically defined monoids, but did not belong to the category IsMonoid (51.2-1); and IsSemilatticeAsSemigroup was simply a property of semigroups, there is no category IsSemilattice.

From Version 4.8 onwards, IsMonoidAsSemigroup returns true for semigroups in the category IsMonoid (51.2-1), and IsSemilatticeAsSemigroup has been moved to the Semigroups under the new name IsSemilattice (Semigroups: IsSemilattice).

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Bib Ind

generated by GAPDoc2HTML