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.)
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) |
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) |
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.
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) |
The operation PositionFirstComponent
has been deprecated in GAP 4.8 due to issues with its documentation and implementation, and was removed in GAP 4.10. Instead of PositionFirstComponent(list,obj)
, you may use PositionSorted(list,[obj])
or PositionProperty(list,x->x[1]=obj)
as a replacement, depending on your specific use case.
The five argument version of the operation MultRowVector
has been deprecated in GAP 4.10 since it was unused and only available for coefficient lists. Note that MultRowVector
was also renamed to MultVectorLeft
.
The function TemporaryGlobalVarName
has been deprecated in GAP 4.11. Code using it typically can be restructured to not need it, e.g. by using EvalString
(27.9-5).
A bunch of synonyms have been deprecated in GAP 4.13. The alternative names have always existed and so are safe to use even in code which is meant to run in older GAP versions.
Deprecated | Recommended alternative |
OneSM |
OneSameMutability (31.10-2) |
InverseSM |
InverseSameMutability (31.10-8) |
ZeroSM |
ZeroSameMutability (31.10-3) |
AdditiveInverseSM |
AdditiveInverseSameMutability (31.10-9) |
OneAttr |
One (31.10-2), OneImmutable (31.10-2) |
InverseAttr |
Inverse (31.10-8), InverseImmutable (31.10-8) |
ZeroAttr |
Zero (31.10-3), ZeroImmutable (31.10-3) |
AdditiveInverseAttr |
AdditiveInverse (31.10-9), AdditiveInverseImmutable (31.10-9) |
‣ 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.
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
.
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
(???).
generated by GAPDoc2HTML