Skip to content

Commit

Permalink
Merge branch 'work' of https://github.com/hulpke/gap into work
Browse files Browse the repository at this point in the history
  • Loading branch information
hulpke committed Jan 23, 2019
2 parents 094b1ab + c5c2e23 commit 81ac56a
Show file tree
Hide file tree
Showing 101 changed files with 1,204 additions and 1,457 deletions.
3 changes: 3 additions & 0 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ GAP_CPPFLAGS += "-DCOMPILECYGWINDLL"
# increase stack size, the default is too small (see issue #1522)
GAP_LDFLAGS += -Wl,--stack,16777216

# Allow multiple definitions so we can declare a function multiple times with 'extern inline'
GAP_LDFLAGS += -Wl,--allow-multiple-definition

# Special build rules for CYGWIN / Windows: In order to allow kernel
# extensions, we employ a trick: GAP itself is compiled into DLL, in which
# GAP's standard main function is renamed. And gap.exe is a tiny binary which
Expand Down
1 change: 1 addition & 0 deletions cnf/m4/ax_compiler_flags_cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ AC_DEFUN([AX_COMPILER_WARNING_FLAGS],[
# suggest-attribute=format is disabled because it gives too many false
# positives
AX_APPEND_FLAG([-Werror],ax_warn_cflags_variable)
AX_APPEND_FLAG([-Werror],ax_warn_cxxflags_variable)
AX_APPEND_COMPILE_FLAGS([ dnl
[$ax_compiler_no_suggest_attribute_flags] dnl
Expand Down
4 changes: 2 additions & 2 deletions hpcgap/extern/libatomic_ops/src/atomic_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@

/* The most common way to clear a test-and-set location */
/* at the end of a critical section. */
#if AO_AO_TS_T && !defined(AO_CLEAR)
#if defined(AO_AO_TS_T) && !defined(AO_CLEAR)
# define AO_CLEAR(addr) AO_store_release((AO_TS_t *)(addr), AO_TS_CLEAR)
#endif
#if AO_CHAR_TS_T && !defined(AO_CLEAR)
#if defined(AO_CHAR_TS_T) && !defined(AO_CLEAR)
# define AO_CLEAR(addr) AO_char_store_release((AO_TS_t *)(addr), AO_TS_CLEAR)
#endif

Expand Down
20 changes: 10 additions & 10 deletions hpcgap/extern/libatomic_ops/src/atomic_ops/generalize.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
# define AO_HAVE_compare_and_swap_release
# endif

# if AO_CHAR_TS_T
# if defined(AO_CHAR_TS_T)
# define AO_TS_COMPARE_AND_SWAP_FULL(a,o,n) \
AO_char_compare_and_swap_full(a,o,n)
# define AO_TS_COMPARE_AND_SWAP_ACQUIRE(a,o,n) \
Expand All @@ -109,7 +109,7 @@
# define AO_TS_COMPARE_AND_SWAP(a,o,n) AO_char_compare_and_swap(a,o,n)
# endif

# if AO_AO_TS_T
# if defined(AO_AO_TS_T)
# define AO_TS_COMPARE_AND_SWAP_FULL(a,o,n) AO_compare_and_swap_full(a,o,n)
# define AO_TS_COMPARE_AND_SWAP_ACQUIRE(a,o,n) \
AO_compare_and_swap_acquire(a,o,n)
Expand All @@ -118,8 +118,8 @@
# define AO_TS_COMPARE_AND_SWAP(a,o,n) AO_compare_and_swap(a,o,n)
# endif

# if (AO_AO_TS_T && defined(AO_HAVE_compare_and_swap_full)) \
|| (AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap_full))
# if (defined(AO_AO_TS_T) && defined(AO_HAVE_compare_and_swap_full)) \
|| (defined(AO_CHAR_TS_T) && defined(AO_HAVE_char_compare_and_swap_full))
AO_INLINE AO_TS_VAL_t
AO_test_and_set_full(volatile AO_TS_t *addr)
{
Expand All @@ -131,8 +131,8 @@
# define AO_HAVE_test_and_set_full
# endif /* AO_HAVE_compare_and_swap_full */

# if (AO_AO_TS_T && defined(AO_HAVE_compare_and_swap_acquire)) \
|| (AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap_acquire))
# if (defined(AO_AO_TS_T) && defined(AO_HAVE_compare_and_swap_acquire)) \
|| (defined(AO_CHAR_TS_T) && defined(AO_HAVE_char_compare_and_swap_acquire))
AO_INLINE AO_TS_VAL_t
AO_test_and_set_acquire(volatile AO_TS_t *addr)
{
Expand All @@ -144,8 +144,8 @@
# define AO_HAVE_test_and_set_acquire
# endif /* AO_HAVE_compare_and_swap_acquire */

# if (AO_AO_TS_T && defined(AO_HAVE_compare_and_swap_release)) \
|| (AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap_release))
# if (defined(AO_AO_TS_T) && defined(AO_HAVE_compare_and_swap_release)) \
|| (defined(AO_CHAR_TS_T) && defined(AO_HAVE_char_compare_and_swap_release))
AO_INLINE AO_TS_VAL_t
AO_test_and_set_release(volatile AO_TS_t *addr)
{
Expand All @@ -157,8 +157,8 @@
# define AO_HAVE_test_and_set_release
# endif /* AO_HAVE_compare_and_swap_release */

# if (AO_AO_TS_T && defined(AO_HAVE_compare_and_swap)) \
|| (AO_CHAR_TS_T && defined(AO_HAVE_char_compare_and_swap))
# if (defined(AO_AO_TS_T) && defined(AO_HAVE_compare_and_swap)) \
|| (defined(AO_CHAR_TS_T) && defined(AO_HAVE_char_compare_and_swap))
AO_INLINE AO_TS_VAL_t
AO_test_and_set(volatile AO_TS_t *addr)
{
Expand Down
38 changes: 15 additions & 23 deletions hpcgap/lib/vecmat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,10 @@ InstallMethod( PrintObj,
function( mat )
local i, j;
Print( "\>\>[ \>\>" );
for i in [ 1 .. Length(mat) ] do
for i in [ 1 .. NrRows(mat) ] do
if 1 < i then Print( "\<,\< \>\>" ); fi;
Print( "\>\>[ \>\>" );
for j in [ 1 .. Length(mat[i]) ] do
for j in [ 1 .. NrCols(mat) ] do
if 1 < j then Print( "\<,\< \>\>" ); fi;
Print( mat[i][j] );
od;
Expand All @@ -705,19 +705,11 @@ InstallMethod( ViewObj,
0,

function( mat )
if Length(mat) = 0 then
if IsMutable(mat) then
Print( "<a 0x0 matrix over GF2>" );
else
Print( "<an immutable 0x0 matrix over GF2>" );
fi;
if IsMutable(mat) then
Print("<a ",NrRows(mat),"x",NrCols(mat)," matrix over GF2>");
else
if IsMutable(mat) then
Print("<a ",Length(mat),"x",Length(mat[1])," matrix over GF2>");
else
Print( "<an immutable ", Length(mat), "x", Length(mat[1]),
" matrix over GF2>" );
fi;
Print( "<an immutable ", NrRows(mat), "x", NrCols(mat),
" matrix over GF2>" );
fi;
end );

Expand Down Expand Up @@ -876,7 +868,7 @@ InstallMethod( InverseSameMutability,
fi;
if IsMutable(m) then
if not IsMutable(m[1]) then
for i in [1..Length(m)] do
for i in [1..NrRows(m)] do
MakeImmutable(inv[i]);
od;
fi;
Expand Down Expand Up @@ -926,8 +918,8 @@ InstallMethod( OneOp,
0,
function(mat)
local len;
len := Length(mat);
if len <> Length(mat[1]) then
len := NrRows(mat);
if len <> NrCols(mat) then
return fail;
fi;
return GF2IdentityMatrix(len, 0);
Expand All @@ -945,8 +937,8 @@ InstallMethod( One,
0,
function(mat)
local len;
len := Length(mat);
if len <> Length(mat[1]) then
len := NrRows(mat);
if len <> NrCols(mat) then
return fail;
fi;
return GF2IdentityMatrix(len, 2);
Expand All @@ -964,11 +956,11 @@ InstallMethod( OneSameMutability,
0,
function(mat)
local len,row1;
len := Length(mat);
row1 := mat[1];
if len <> Length(row1) then
len := NrRows(mat);
if len <> NrCols(mat) then
return fail;
fi;
row1 := mat[1];
if not IsMutable(mat) then
return GF2IdentityMatrix(len, 2);
elif IsMutable(mat) and not IsMutable(row1) then
Expand Down Expand Up @@ -1609,7 +1601,7 @@ local sf, rep, ind, ind2, row, i,big,l;
# get the indices of the rows that need changing the representation.
ind:=[]; # rows to convert
ind2:=[]; # rows to rebuild
for i in [1..Length(matrix)] do
for i in [1..NrRows(matrix)] do
if not rep(matrix[i]) then
if big or IsLockedRepresentationVector(matrix[i])
or (IsMutable(matrix[i]) and not change) then
Expand Down
2 changes: 1 addition & 1 deletion lib/claspcgs.gi
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ local classes, # classes to be constructed, the result
depthlev, # depth at which N starts
one,zero,
vec,
dict,
dict,
kern,img;

depthlev:=DepthOfPcElement(home,N[1]);
Expand Down
4 changes: 2 additions & 2 deletions lib/combinat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1304,8 +1304,8 @@ InstallMethod(Permanent,
function ( mat )
local m, n;

m := Length(mat);
n := Length(mat[1]);
m := NrRows(mat);
n := NrCols(mat);
while n<m do
Error("Matrix may not have fewer columns than rows");
od;
Expand Down
20 changes: 11 additions & 9 deletions lib/fitfree.gi
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,17 @@ local ffs,hom,U,rest,ker,r,p,l,i,depths;

U!.cachedFFS:=[[ffs,r]];

# FittingFreeLiftSetup for U
r:=rec(inducedfrom:=ffs,
pcgs:=ipcgs,
depths:=depths,
pcisom:=ffs.pcisom,
radical:=ker,
factorhom:=rest
);
SetFittingFreeLiftSetup(U,r);
# FittingFreeLiftSetup for U, if correct
if Size(RadicalGroup(Image(rest,U)))=1 then
r:=rec(inducedfrom:=ffs,
pcgs:=ipcgs,
depths:=depths,
pcisom:=ffs.pcisom,
radical:=ker,
factorhom:=rest
);
SetFittingFreeLiftSetup(U,r);
fi;

return U;

Expand Down
9 changes: 5 additions & 4 deletions lib/grp.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#############################################################################
##
## This file is part of GAP, a system for computational discrete algebra.
## This files's authors include Thomas Breuer, Frank Celler, Bettina Eick, Heiko Theißen.
## This files's authors include Thomas Breuer, Frank Celler, Bettina Eick,
## Heiko Theißen.
##
## Copyright of GAP belongs to its developers, whose names are too numerous
## to list here. Please refer to the COPYRIGHT file for details.
Expand Down Expand Up @@ -1875,8 +1876,8 @@ DeclareAttribute( "MinimalNormalSubgroups", IsGroup );
## returns a list of all normal subgroups of <A>G</A>.
## <Example><![CDATA[
## gap> g:=SymmetricGroup(4);;NormalSubgroups(g);
## [ Sym( [ 1 .. 4 ] ), Alt( [ 1 .. 4 ] ), Group([ (1,4)(2,3), (1,2)
## (3,4) ]), Group(()) ]
## [ Sym( [ 1 .. 4 ] ), Alt( [ 1 .. 4 ] ), Group([ (1,4)(2,3), (1,3)
## (2,4) ]), Group(()) ]
## ]]></Example>
## <P/>
## The algorithm for the computation of normal subgroups is described in
Expand Down Expand Up @@ -3232,7 +3233,7 @@ DeclareOperation("CentralizerModulo", [IsGroup,IsGroup,IsObject]);
## [ <pc group of size 12 with 3 generators>, Group([ y3, y*y3 ]), Group([ y*y3 ]) ]
## gap> g:=SymmetricGroup(4);;
## gap> PCentralSeries(g,2);
## [ Sym( [ 1 .. 4 ] ), Group([ (1,2,3), (1,3,4) ]) ]
## [ Sym( [ 1 .. 4 ] ), Group([ (1,2,3), (2,3,4) ]) ]
## ]]></Example>
## </Description>
## </ManSection>
Expand Down
2 changes: 1 addition & 1 deletion lib/grpfp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ function ( fgens, grels, fsgens )
fi;
# call the TC plugin. Option ensures no factorization takes place in printing
# (which can confuse the ACE interface).
return TCENUM.CosetTableFromGensAndRels(fgens,grels,fsgens:printnopower:=true);
return TCENUM.CosetTableFromGensAndRels(fgens,grels,fsgens:printnopowers:=true);
end);

# this function implements the library version of the Todd-Coxeter routine.
Expand Down
21 changes: 9 additions & 12 deletions lib/kbsemi.gi
Original file line number Diff line number Diff line change
Expand Up @@ -501,33 +501,28 @@ InstallMethod(IsReduced,
"for a Knuth Bendix rewriting system", true,
[IsKnuthBendixRewritingSystem and IsKnuthBendixRewritingSystemRep and IsMutable], 0,
function(kbrws)
local i,copy_of_kbrws,u;
local i, copy_of_kbrws, u, tzr;

# if the rws already knows it is reduced return true
if kbrws!.reduced then return true; fi;

for i in [1..Length(Rules(kbrws))] do
tzr := TzRules(kbrws);
for i in [1..Length(tzr)] do

u := Rules(kbrws)[i];
u := tzr[i];

#TODO
copy_of_kbrws := ShallowCopy(kbrws);
copy_of_kbrws!.tzrules := [];
Append(copy_of_kbrws!.tzrules,kbrws!.tzrules{[1..i-1]});
Append(copy_of_kbrws!.tzrules,kbrws!.tzrules
{[i+1..Length(kbrws!.tzrules)]});

if ReduceLetterRepWordsRewSys(copy_of_kbrws!.tzrules,u[1])<>u[1] then
return false;
fi;
if ReduceLetterRepWordsRewSys(copy_of_kbrws!.tzrules,u[2])<>u[2] then
if ReduceLetterRepWordsRewSys(copy_of_kbrws!.tzrules,u[1])<>u[1] or
ReduceLetterRepWordsRewSys(copy_of_kbrws!.tzrules,u[2])<>u[2] then
return false;
fi;

od;

return true;

end);


Expand Down Expand Up @@ -788,7 +783,9 @@ InstallMethod( ShallowCopy,
reduced := false,
tzrules:= StructuralCopy(kbrws!.tzrules),
pairs2check:= [],
ordering :=kbrws!.ordering)));
ordering :=kbrws!.ordering,
freefam := kbrws!.freefam,
tzordering := kbrws!.tzordering)));

###############################################################################
##
Expand Down
Loading

0 comments on commit 81ac56a

Please sign in to comment.