The GAP 4 type system: organising algebraic algorithms
Thomas G. K. Breuer, Steve Linton · 1998
Version 4 of the GAP (Groups, Algorithms, Programming) system for computational discrete mathematics has a number of novel features. In this paper, we describe the type system, and the way in which it is used for method selection. This system is central to the organisation of the library which is the main part of the GAP system. Unlike simpler object-oriented systems, GAP allows method selection based on the types of all arguments and on certain aspects of the relationship between the arguments. In addition, the type of an object can change, in a controlled way, during its life. This reflects information about the object which has been computed and stored. Individual methods can be written and installed independently. Furthermore most checking of the arguments is done in a uniform way by the method selection system, making individual methods simpler and less prone to error. The methods are combined automatically to produce a powerful and usable system for interactive use or programming...