<Chapter Label="ChangesGAP47toGAP48"> 
<Heading>Changes between &GAP; 4.7 and &GAP; 4.8</Heading>

This chapter contains an overview of the most important changes
introduced in &GAP; 4.8.2 release (the 1st public release of &GAP; 4.8).
Later it will also contain information about subsequent update 
releases for &GAP; 4.8.

First of all, the &GAP; development repository is now hosted on GitHub at
<URL>https://github.com/gap-system/gap</URL>, and &GAP; 4.8 is the first 
major &GAP; release made from this repository. The public issue tracker
for the core &GAP; system is located at 
<URL>https://github.com/gap-system/gap/issues</URL>,
and you may use appropriate milestones from 
<URL>https://github.com/gap-system/gap/milestones</URL> to see all changes
that were introduced in corresponding &GAP; releases. An overview of the
most significant ones is provided below.

<Section Label="gap482">
<Heading>&GAP; 4.8.2 (February 2016)</Heading>

<Subsection Label="Changes in the core GAP48 system"> 
<Heading>Changes in the core &GAP; system introduced in &GAP; 4.8</Heading>

New features:
<List>
<Item>
Added support for profiling which tracks how much time in spent on each line
of &GAP; code. This can be used to show where code is spending a long time
and also check which lines of code are even executed. See the documentation
for <Ref Func="ProfileLineByLine" BookName="ref"/> and
<Ref Func="CoverageLineByLine" BookName="ref"/> for details on generating profiles,
and the <Package>Profiling</Package> package for transforming these profiles
into a human-readable form.
</Item>
<!-- https://github.com/gap-system/gap/pull/192 -->
<Item>Added ability to install (in the library or packages) methods
for accessing lists using multiple indices and indexing into lists
using indices other than positive small integers. Such methods could allow,
for example, to support expressions like
<Log><![CDATA[
m[1,2];
m[1,2,3] := x;
IsBound(m["a","b",Z(7)]);
Unbind(m[1][2,3])
]]></Log>
</Item>
<Item>
<!-- https://github.com/gap-system/gap/pull/90 -->
Added support for partially variadic functions to allow function expressions
like
<Log><![CDATA[
function( a, b, c, x... ) ... end;
]]></Log>
which would require at least three arguments and assign the first three
to <A>a</A>, <A>b</A> and <A>c</A> and then a list containing any remaining
ones to <A>x</A>.
<P/>
The former special meaning of the argument <A>arg</A> is still supported
and is now equivalent to <C>function( arg... )</C>, so no changes in the
existing code are required.
</Item>
<Item>
Introduced <C>CallWithTimeout</C> and <C>CallWithTimeoutList</C> to call a
function with a limit on the CPU time it can consume. This functionality may
not be available on all systems and you should check
<C>GAPInfo.TimeoutsSupported</C> before using this functionality.
<!-- https://github.com/gap-system/gap/pull/1324 -->
(These functions were withdrawn in &GAP; 4.9.)
</Item>
<Item>
&GAP; now displays the filename and line numbers of statements in backtraces
when entering the break loop.
</Item>
<Item>
Introduced <Ref Func="TestDirectory" BookName="ref"/> function to find
(recursively) all <F>.tst</F> files from a given directory or a list of
directories and run them using <Ref Func="Test" BookName="ref"/>.
</Item>
</List>

Improved and extended functionality:
<List>
<Item>
Method tracing shows the filename and line of function during tracing.
</Item>
<Item>
<Ref Func="TraceAllMethods" BookName="ref"/> and
<Ref Func="UntraceAllMethods" BookName="ref"/> to turn on and off tracing all
methods in &GAP;. Also, for the uniform approach
<Ref Func="UntraceImmediateMethods" BookName="ref"/> has been added as an
equivalent of <C>TraceImmediateMethods(false)</C>.
</Item>
<Item>
The most common cases of <Ref Oper="AddDictionary" BookName="ref"/> 
on three arguments now bypass method selection, avoiding the cost 
of determining homogeneity for plain lists of mutable objects.
</Item>
<Item>
Improved methods for symmetric and alternating groups in the "natural"
representations and removed some duplicated code.
</Item>
<Item> 
<!-- https://github.com/gap-system/gap/issues/7 -->
Package authors may optionally specify the source code repository,
issue tracker and support email address for their package using new
components in the <File>PackageInfo.g</File> file, which will be used
to create hyperlinks from the package overview page (see 
<File>PackageInfo.g</File> from the Example package which you may use
as a template).
</Item>
</List>

Changed functionality:
<List>  
<Item>
As a preparation for the future developments to support multithreading,
some language extensions from the <Package>HPC-GAP</Package> project were
backported to the &GAP; library to help to unify the codebase of both 
&GAP;&nbsp;4 and <Package>HPC-GAP</Package>. The only change which is not backwards
compatible is that <C>atomic</C>, <C>readonly</C> and <C>readwrite</C> are
now keywords, and thus are no longer valid identifiers.
So if you have any variables or functions using that name,
you will have to change it in &GAP; 4.8.
</Item>
<Item>
There was inconsistent use of the following properties of semigroups:
<C>IsGroupAsSemigroup</C>, <C>IsMonoidAsSemigroup</C>, and
<C>IsSemilatticeAsSemigroup</C>. <C>IsGroupAsSemigroup</C> was true for
semigroups that mathematically defined a group, and for semigroups in the
category <Ref Filt="IsGroup" BookName="ref"/>; <C>IsMonoidAsSemigroup</C>
was only true for semigroups that mathematically defined monoids, but did
not belong to the category <Ref Filt="IsMonoid" BookName="ref"/>; and
<C>IsSemilatticeAsSemigroup</C> was simply a property of semigroups, as
there is no category <C>IsSemilattice</C>.
<P/>
From version 4.8 onwards, <C>IsSemilatticeAsSemigroup</C> is renamed to
<C>IsSemilattice</C>, and <C>IsMonoidAsSemigroup</C> returns true for
semigroups in the category <Ref Filt="IsMonoid" BookName="ref"/>.
<P/>
This way all of the properties of the type <C>IsXAsSemigroup</C> are consistent.
It should be noted that the only methods installed for <C>IsMonoidAsSemigroup</C>
belong to the <Package>Semigroups</Package> and <Package>Smallsemi</Package> packages.
</Item>
<Item>
<C>ReadTest</C> became obsolete and for backwards compatibility is replaced by
<Ref Func="Test" BookName="ref"/> with the option to compare the output up to
whitespaces.
</Item>
<Item>The function `ErrorMayQuit`, which differs from
<Ref Func="Error" BookName="ref"/> by not allowing execution to continue,
has been renamed to <Ref Func="ErrorNoReturn" BookName="ref"/>.
</Item>
</List>

Fixed bugs:

<List>
<Item>
A combination of two bugs could lead to a segfault. First off,
<Ref Func="NullMat" BookName="ref"/> (and various other &GAP; functions),
when asked to produce matrix over a small field, called 
<Ref Func="ConvertToMatrixRep" BookName="ref"/>. After this, if the user
tried to change one of the entries to a value from a larger extension
field, this resulted in an error. (This is now fixed).
<P/>
Unfortunately, the C code catching this error had a bug and allowed
users to type <Q>return</Q> to continue while ignoring the conversion
error. This was a bad idea, as the C code would be in an inconsistent
state at this point, subsequently leading to a crash.
<P/>
This, too, has been fixed, by not allowing the user to ignore the error
by entering <Q>return</Q>.
</Item>
<Item>
The Fitting-free code and code inheriting PCGS is now using
<Ref Attr="IndicesEANormalSteps" BookName="ref"/> instead of
<Ref Attr="IndicesNormalSteps" BookName="ref"/>, as these indices are neither
guaranteed, nor required to be maximally refined when restricting to subgroups.
</Item>
<Item>
A bug that caused a break loop in the computation of the Hall subgroup for
groups having a trivial Fitting subgroup.
</Item>
<Item>
Including a <C>break</C> or <C>continue</C> statement in a function body
but not in a loop now gives a syntax error instead of failing at run time.
</Item>
<Item>
<Ref Oper="GroupGeneralMappingByImages" BookName="ref"/> now verifies that
that image of a mapping is contained in its range.
</Item>
<Item>
Fixed a bug in caching the degree of transformation that could lead to a
non-identity transformation accidentally changing its value to the identity
transformation.
</Item>
<Item>
Fixed the problem with using Windows default browser as a help viewer using
<C>SetHelpViewer("browser");</C>.
</Item>
</List>

</Subsection>

<Subsection Label="New and updated packages since GAP 4.7.8"> 
<Heading>New and updated packages since &GAP; 4.7.8</Heading>

<Index>Packages, new</Index>
At the time of the release of &GAP; 4.7.8 there were 119 packages 
redistributed with &GAP;. New packages that have been added to the 
redistribution since the release of &GAP; 4.7.8 are: 

<List>
<Item>
<Package>CAP</Package> (Categories, Algorithms, Programming) package
by Sebastian Gutsche, Sebastian Posur and Øystein Skartsæterhagen,
together with three associated packages
<Package>GeneralizedMorphismsForCAP</Package>,
<Package>LinearAlgebraForCAP</Package> and
<Package>ModulePresentationsForCAP</Package>
(all three - by Sebastian Gutsche and Sebastian Posur).
</Item>
<Item>
<Package>Digraphs</Package> package by Jan De Beule, Julius Jonušas,
James Mitchell, Michael Torpey and Wilf Wilson, which provides
functionality to work with graphs, digraphs, and multidigraphs.
</Item>
<Item>
<Package>FinInG</Package> package by John Bamberg, Anton Betten,
Philippe Cara, Jan De Beule, Michel Lavrauw and Max Neunhöffer
for computation in Finite Incidence Geometry.
</Item>
<Item>
<Package>HeLP</Package> package by Andreas Bächle and Leo Margolis,
which computes constraints on partial augmentations of torsion units
in integral group rings using a method developed by Luthar, Passi and
Hertweck.  The package can be employed to verify the Zassenhaus
Conjecture and the Prime Graph Question for finite groups, once
their characters are known. It uses an interface to the software
package <Package>4ti2</Package> to solve integral linear inequalities.
</Item>
<Item>
<Package>matgrp</Package> package by Alexander Hulpke, which provides
an interface to the solvable radical functionality for matrix groups,
building on constructive recognition.
</Item>
<Item>
<Package>NormalizInterface</Package> package by Sebastian Gutsche,
Max Horn and Christof Söger, which provides a GAP interface to
<Package>Normaliz</Package>, enabling direct access to the complete
functionality of <Package>Normaliz</Package>, such as computations
in affine monoids, vector configurations, lattice polytopes, and
rational cones.
</Item>
<Item>
<Package>profiling</Package> package by Christopher Jefferson for
transforming profiles produced by <Ref Func="ProfileLineByLine" BookName="ref"/>
and <Ref Func="CoverageLineByLine" BookName="ref"/> into a human-readable form.
</Item>
<Item>
<Package>Utils</Package> package by Sebastian Gutsche, Stefan Kohl and
Christopher Wensley, which provides a collection of utility functions
gleaned from many packages.
</Item>
<Item>
<Package>XModAlg</Package> package by Zekeriya Arvasi and Alper Odabas,
which provides a collection of functions for computing with crossed
modules and Cat1-algebras and morphisms of these structures.
</Item>
</List>

</Subsection>

</Section>


<Section Label="gap483">
<Heading>&GAP; 4.8.3 (March 2016)</Heading>

<Subsection Label="Changes in the core GAP system introduced in GAP 4.8.3">
<Heading>Changes in the core &GAP; system introduced in &GAP; 4.8.3</Heading>

New features:
<List>
<Item>
<!-- #647 -->
New function <Ref Func="TestPackage" BookName="ref"/> to run standard tests
(if available) for a single package in the current &GAP; session (also callable
via <C>make testpackage PKGNAME=pkgname</C> to run package tests in the same
settings that are used for testing &GAP; releases).
</Item>
</List>

Improved and extended functionality:
<List>
<Item>
<!-- #670 -->
<Ref Func="TestDirectory" BookName="ref"/> now prints a special status message
to indicate the outcome of the test (this is convenient for automated testing).
If necessary, this message may be suppressed by using the option
<C>suppressStatusMessage</C>
</Item>
<Item>
<!-- [#655] -->
Improved output of tracing methods (which may be invoked, for example, with
<Ref Func="TraceAllMethods" BookName="ref"/>) by displaying filename and line
number in some more cases.
</Item>
</List>

Changed functionality:
<List>
<Item>
<!-- #615 -->
Fixed some inconsistencies in the usage of
<Ref Prop="IsGeneratorsOfSemigroup" BookName="ref"/>.
</Item>
</List>

Fixed bugs that could lead to incorrect results:
<List>
<Item>
<!-- #626 -->
Fallback methods for conjugacy classes, that were never intended for infinite
groups, now use <Ref Prop="IsFinite" BookName="ref"/> filter to prevent them
being called for infinite groups. [Reported by Gabor Horvath]
</Item>
</List>

Fixed bugs that could lead to break loops:
<List>
<Item>
<!-- #665 -->
Calculating stabiliser for the alternating group caused a break loop in the
case when it defers to the corresponding symmetric group.
</Item>
<Item>
<!-- #663 -->
It was not possible to use <Ref Func="DotFileLatticeSubgroups" BookName="ref"/>
for a trivial group. [Reported by Sergio Siccha]
</Item>
<Item>
<!-- #648 -->
A break loop while computing <Ref Attr="AutomorphismGroup" BookName="ref"/> for
<C>TransitiveGroup(12,269)</C>. [Reported by Ignat Soroko]
</Item>
<Item>
<!-- #622 -->
A break loop while computing conjugacy classes of <C>PSL(6,4)</C>.
[Reported by Martin Macaj]
</Item>
</List>

Other fixed bugs:
<List>
<Item>
<!-- #654 -->
Fix for using Firefox as a default help viewer with
<Ref Func="SetHelpViewer" BookName="ref"/>. [Reported by Tom McDonough]
</Item>
</List>
</Subsection>
</Section>

<Section Label="gap484">
<Heading>&GAP; 4.8.4 (June 2016)</Heading>

<Subsection Label="Changes in the core GAP system introduced in GAP 4.8.4">
<Heading>Changes in the core &GAP; system introduced in &GAP; 4.8.4</Heading>

New features:
<List>
<Item>
<!-- #737 -->
The &GAP; distribution now includes <F>bin/BuildPackages.sh</F>, a script which
can be started from the <F>pkg</F> directory via <C>../bin/BuildPackages.sh</C>
and will attempt to build as many packages as possible. It replaces the
<F>InstPackages.sh</F> script which was not a part of the &GAP; distribution
and had to be downloaded separately from the &GAP; website. The new script is
more robust and simplifies adding new packages with binaries, as it requires no
adjustments if the new package supports the standard <C>./configure; make</C>
build procedure.
</Item>
</List>

Improved and extended functionality:
<List>
<Item>
<!-- #678 -->
<Ref Func="SimpleGroup" BookName="ref"/> now produces more informative error
message in the case when <Ref Func="AtlasGroup" BookName="AtlasRep"/> could
not load the requested group.
</Item>
<Item>
<!-- #610 -->
An info message with the suggestion to use
<Ref InfoClass="InfoPackageLoading" BookName="ref"/> will now be displayed
when <Ref Func="LoadPackage" BookName="ref"/> returns <K>fail</K>
(unless &GAP; is started with <C>-b</C> option).
</Item>
<Item>
<!-- #728 -->
The build system will now enable C++ support in GMP
only if a working C++ compiler is detected.
</Item>
<Item>
<!-- #757 -->
More checks were added when embedding coefficient rings or rational numbers
into polynomial rings in order to forbid adding polynomials in different
characteristic.
</Item>
</List>

Fixed bugs that could lead to crashes:
<List>
<Item>
<!-- #685 -->
Fixed the crash in <C>--cover</C> mode when reading files
with more than 65,536 lines.
</Item>
</List>

Fixed bugs that could lead to incorrect results:
<List>
<Item>
<!-- #741 -->
Fixed an error in the code for partial permutations that
occurred on big-endian systems. [Reported by Bill Allombert]
</Item>
<Item>
<!-- #766 -->
Fixed the kernel method for <Ref Oper="Remove" BookName="ref"/> with
one argument, which failed to reduce the length of a list to the
position of the last bound entry. [Reported by Peter Schauenburg]
</Item>
</List>

Fixed bugs that could lead to break loops:
<List>
<Item>
<!-- #679 -->
Fixed the break loop while using <Ref Oper="Factorization" BookName="ref"/>
on permutation groups by removing some old code that relied on further caching
in <C>Factorization</C>. [Reported by Grahame Erskine]
</Item>
<Item>
<!-- #681 -->
Fixed a problem with computation of maximal subgroups in an almost
simple group. [Reported by Ramon Esteban Romero]
</Item>
<Item>
<!-- #773 -->
Added missing methods for <Ref Oper="Intersection2" BookName="ref"/>
when one of the arguments is an empty list. [Reported by Wilf Wilson]
</Item>
</List>

Other fixed bugs:
<List>
<Item>
<!-- #770 -->
Fixed several bugs in <Ref Func="RandomPrimitivePolynomial" BookName="ref"/>.
[Reported by Nusa Zidaric]
</Item>
<Item>
<!-- #781 -->
Fixed several problems with <Ref Oper="Random" BookName="ref"/>
on long lists in 64-bit GAP installations.
</Item>
</List>

</Subsection>

</Section>

<Section Label="gap485">
<Heading>&GAP; 4.8.5 (September 2016)</Heading>

<Subsection Label="Changes in the core GAP system introduced in GAP 4.8.5">
<Heading>Changes in the core &GAP; system introduced in &GAP; 4.8.5</Heading>

Improved and extended functionality:
<List>
<Item>
<!-- #827 -->
The error messages produced when an unexpected <K>fail</K> is returned were
made more clear by explicitly telling that the result should not be boolean
or <K>fail</K> (before it only said <Q>not a boolean</Q>).
</Item>
<Item>
<!-- #797 -->
For consistency, both <Ref Func="NrTransitiveGroups" BookName="transgrp" /> and
<Ref Func="TransitiveGroup" BookName="transgrp" /> now disallow the transitive
group of degree 1.
</Item>
</List>

Fixed bugs that could lead to incorrect results:
<List>
<Item>
<!-- #869 -->
A bug in the code for algebraic field extensions over non-prime fields that
may cause, for example, a list of all elements of the extension not being
a duplicate-free. [Reported by Huta Gana]
</Item>
<Item>
<!-- #875 -->
So far, <Ref Func="FileString" BookName="GAPDoc" /> only wrote files of sizes
less than 2G and did not indicate an error in case of larger strings. Now
strings of any length can be written, and in the case of a failure
the corresponding system error is shown.
</Item>
</List>

Fixed bugs that could lead to break loops:
<List>
<Item>
<!-- #877 -->
<Ref Oper="NaturalHomomorphismByIdeal" BookName="ref" /> was not reducing
monomials before forming a quotient ring, causing a break loop on some
inputs. [Reported by Dmytro Savchuk]
</Item>
<Item>
<!-- #867 -->
A bug in <Ref Func="DefaultInfoHandler" BookName="ref" /> caused
a break loop on startup with the setting
<C>SetUserPreference( "InfoPackageLoadingLevel", 4 )</C>`.
[Reported by Mathieu Dutour]
</Item>
<Item>
<!-- #801 -->
The <Ref Oper="Iterator" BookName="ref" /> for permutation groups was broken
when the <Ref Attr="StabChainMutable" Label="for a group" BookName="ref" />
of the group was not reduced, which can reasonably happen as the result of
various algorithms.
</Item>
</List>

</Subsection>

</Section>

<Section Label="gap486">
<Heading>&GAP; 4.8.6 (November 2016)</Heading>

<Subsection Label="Changes in the core GAP system introduced in GAP 4.8.6">
<Heading>Changes in the core &GAP; system introduced in &GAP; 4.8.6</Heading>

Fixed bugs that could lead to break loops:
<List>
<Item>
<!-- #910 -->
Fixed regression in the &GAP; kernel code introduced in &GAP; 4.8.5 and
breaking <Ref Func="StringFile" BookName="gapdoc"/> ability to work
with compressed files. [Reported by Bill Allombert]
</Item>
</List>

</Subsection>

</Section>


<Section Label="gap487">
<Heading>&GAP; 4.8.7 (March 2017)</Heading>

<Subsection Label="Changes in the core GAP system introduced in GAP 4.8.7">
<Heading>Changes in the core &GAP; system introduced in &GAP; 4.8.7</Heading>

Fixed bugs that could lead to incorrect results:
<List>
<Item>
<!-- #1016, #1018 -->
Fixed a regression from &GAP; 4.7.6 when reading compressed
files after a workspace is loaded. Before the fix, if &GAP;
is started with the <C>-L</C> option (load workspace), using
<Ref Oper="ReadLine" BookName="ref"/> on the input stream for
a compressed file returned by <Ref Oper="InputTextFile" BookName="ref"/>
only returned the first character. [Reported by Bill Allombert]
</Item>
</List>

Other fixed bugs:
<List>
<Item>
<!-- #924, 942 -->
Fixed compiler warning occurring when &GAP; is compiled with gcc 6.2.0.
[Reported by Bill Allombert]
</Item>
</List>


</Subsection>


<Subsection Label="New and updated packages since GAP 4.8.6"> 
<Heading>New and updated packages since &GAP; 4.8.6</Heading>

This release contains updated versions of 19 packages from &GAP; 4.8.6
distribution. Additionally, the following package has been added for the
redistribution with &GAP;:

<List>
<Item>
<Package>lpres</Package> package (author: René Hartung, maintainer: Laurent
Bartholdi) to work with L-presented groups, namely groups given by a finite
generating set and a possibly infinite set of relations given as iterates of
finitely many seed relations by a finite set of endomorphisms. The package
implements nilpotent quotient, Todd-Coxeter and Reidemeister-Schreier
algorithms for such groups.
</Item>
</List>

</Subsection>

</Section>


<Section Label="gap488">
<Heading>&GAP; 4.8.8 (August 2017)</Heading>

<Subsection Label="Changes in the core GAP system introduced in GAP 4.8.8">
<Heading>Changes in the core &GAP; system introduced in &GAP; 4.8.8</Heading>

Fixed bugs that could lead to incorrect results:
<List>
<Item>
<!-- #1431 -->
Fixed a bug in <Ref Func="RepresentativeAction" BookName="ref"/> producing
incorrect answers for both symmetric and alternating groups, with both
<Ref Func="OnTuples" BookName="ref"/> and <Ref Func="OnSets" BookName="ref"/>,
by producing elements outside the group. [Reported by Mun See Chang]
</Item>
</List>

Fixed bugs that could lead to break loops:
<List>
<Item>
<!-- #1515 -->
Fixed a bug in <Ref Func="RepresentativeAction" BookName="ref"/>
for <M>S_n</M> and <M>A_n</M> acting on non-standard domains.
</Item>
</List>

Other fixed bugs:
<List>
<Item>
<!-- #1579 -->
Fixed a problem with checking the path to a file
when using the default browser as a help viewer on Windows.
[Reported by Jack Saunders]
</Item>
</List>

</Subsection>

<Subsection Label="New and updated packages since GAP 4.8.7"> 
<Heading>New and updated packages since &GAP; 4.8.7</Heading>

This release contains updated versions of 29 packages from &GAP; 4.8.7
distribution. Additionally, the <Package>Gpd</Package> package
(author: Chris Wensley) has been renamed to <Package>Groupoids</Package>.

</Subsection>

</Section>

</Chapter>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> 
<!-- %% --> 
<!-- %E -->
