GAP

Main Branches

Downloads  Installation  Overview  Data Libraries  Packages  Documentation  Contacts  FAQ  GAP 3 
This is a page on GAP 3, which is still available, but no longer supported. The present version is GAP 4  (See  Status of GAP 3).

GAP 3 to GAP 4

For interactive use or simple programming GAP 4 and GAP 3 look alike, especially the GAP language has not changed much. Few commands have changed names (only if there were urgent reasons) and some tasks are performed more efficiently in GAP 4. Nevertheless the GAP 4 kernel has been rebuilt from the ground up (Martin Schönert, Frank Celler). It now has more efficient memory management, faster function calling, save/load workspace facilities, streams, and fast vector arithmetic for finite fields. It is easier to extend and 64 bit clean. There is now a GAP compiler that produces human-readable C code. This C code can be compiled and loaded dynamically (UNIX only) or compiled into a kernel. Compiled code is automatically loaded when it exists.

In GAP 3, there is a clear-cut distinction between kernel objects such as permutations, words and elements in polycyclic groups etc. and objects that can be represented in the library via records. The user has no access to the internals of kernel objects but full access to library objects. In GAP 4, this distinction has been mellowed. Namely, there are new kinds of objects that can on one hand be designed by the user similar to the records of GAP 3 but which can on the other hand be made immutable in order to be as well protected as the former kernel objects. These new features are intended to make the introduction of new data types much easier than in GAP 3.

Examples for new data structures available in GAP 4 are enumerators (special kinds of lists) and iterators (which admit looping over virtual lists).

Also the representation of algebraic structures via records in GAP 3 has been replaced in GAP 4 by one that uses these new objects. The operations records of GAP 3 have been replaced by a more flexible system. Every GAP 4 object has a type, which is used in the choice of methods for an upcoming computation. Part of this type is known information about the object. For example, when GAP is asked to compute the conjugacy classes of a group, different methods are available. One of these is a method for solvable groups. This method can be chosen if the group is known to be solvable, which would be part of its type. In particular this mechanism is used to utilize mathematical implications.

Those users who want to convert existing GAP 3 code into GAP 4 code will find some advice in the document Migrating to GAP 4.