Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ jobs:
mode: default # There wouldn't be much point testing GAP v4.11 with only needed packages. The only difference is whether Grape is loaded.
pkgs-to-clone: https://github.com/digraphs/graphviz.git
pkgs-to-build: io* orb* datastructures* profiling* grape*
- gap-version: v4.10 # Note: NautyTracesInterface requires GAP 4.12
mode: default # There wouldn't be much point testing GAP v4.10 with only needed packages. The only difference is whether Grape is loaded.
pkgs-to-build: io* orb* datastructures profiling* grape*

steps:
- uses: actions/checkout@v5
Expand All @@ -60,16 +57,11 @@ jobs:
- name: "Build Digraphs . . ."
uses: gap-actions/build-pkg@v2
- name: "Clone additional GAP packages . . ."
if: ${{ matrix.gap-version != 'v4.10' }}
run: |
for PKG in ${{ matrix.pkgs-to-clone }}; do
cd ${GAPROOT}/pkg
git clone $PKG
done
# Special case for GAP v4.10 as it requires checking out a non-default ref
- name: "Clone datastructures v0.2.5 (GAP 4.10 only) . . ."
if: ${{ matrix.gap-version == 'v4.10' }}
run: git clone -b v0.2.5 https://github.com/gap-packages/datastructures ${GAPROOT}/pkg/datastructures
- name: "Build relevant GAP packages . . ."
run: |
cd ${GAPROOT}/pkg
Expand Down
2 changes: 1 addition & 1 deletion Makefile.gappkg
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ KEXT_BINARCHDIR = bin/$(GAParch)
KEXT_SO = $(KEXT_BINARCHDIR)/$(KEXT_NAME).so

# the following settings are provided by sysinfo.gap in GAP >= 4.12;
# for compatibility with older GAP version (at least 4.9, 4.10, 4.11)
# for compatibility with GAP 4.11
# we try to "guess" suitable values here
GAP ?= $(GAPPATH)/gap
GAC ?= $(GAPPATH)/gac
Expand Down
2 changes: 1 addition & 1 deletion PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ PackageDoc := rec(
),

Dependencies := rec(
GAP := ">=4.10.0",
GAP := ">=4.11.0",
NeededOtherPackages := [["IO", ">=4.5.1"],
["orb", ">=4.8.2"],
["datastructures", ">=0.2.5"]],
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ For questions, remarks, suggestions, and issues please use the
## Installation

It is assumed that you have a working copy of [GAP][] with version number
4.10.0 or higher. The most up-to-date version of GAP, and instructions on how
4.11.0 or higher. The most up-to-date version of GAP, and instructions on how
to install it, can be obtained from the
[main GAP webpage](https://www.gap-system.org).

Expand Down
6 changes: 3 additions & 3 deletions gap/attr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1814,8 +1814,8 @@ function(D, maxLength)
# Extends a given chordless path if possible
CCExtension := function(D, path, C, key, blocked)
local v, extendedPath, data;
blocked := BlockNeighbours(D, path[Length(path)], blocked);
for v in OutNeighboursOfVertex(D, path[Length(path)]) do
blocked := BlockNeighbours(D, Last(path), blocked);
for v in OutNeighboursOfVertex(D, Last(path)) do
if DigraphVertexLabel(D, v) > key and blocked[v] = 1
and Length(path) < maxLength then
extendedPath := Concatenation(path, [v]);
Expand All @@ -1828,7 +1828,7 @@ function(D, maxLength)
fi;
fi;
od;
blocked := UnblockNeighbours(D, path[Length(path)], blocked);
blocked := UnblockNeighbours(D, Last(path), blocked);
return [C, blocked];
end;

Expand Down
23 changes: 11 additions & 12 deletions gap/io.gi
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ function(filename)
fi;

splitname := SplitString(filename, ".");
extension := splitname[Length(splitname)];
extension := Remove(splitname);

if extension in ["gz", "bz2", "xz"] then
extension := splitname[Length(splitname) - 1];
extension := Remove(splitname);
fi;

if extension = "txt" then
Expand Down Expand Up @@ -313,10 +313,10 @@ function(filename)
fi;

splitname := SplitString(filename, ".");
extension := splitname[Length(splitname)];
extension := Remove(splitname);

if extension in ["gz", "bz2", "xz"] then
extension := splitname[Length(splitname) - 1];
extension := Remove(splitname);
fi;

if extension = "txt" then
Expand Down Expand Up @@ -549,9 +549,8 @@ function(arg...)
# the file encoder was not specified and cannot be deduced from the
# filename, so we try to make a guess based on the digraphs themselves
splitname := SplitString(name, ".");
if splitname[Length(splitname)] in ["xz", "gz", "bz2"] then
compext := splitname[Length(splitname)];
splitname := splitname{[1 .. Length(splitname) - 1]};
if Last(splitname) in ["xz", "gz", "bz2"] then
compext := Remove(splitname);
fi;

# Do we know all the graphs to be symmetric?
Expand Down Expand Up @@ -647,7 +646,7 @@ function(arg...)
" is a whole file encoder, and so only one digraph should be ",
"specified. Only the last digraph will be encoded.");
fi;
IO_Write(file, encoder(digraphs[Length(digraphs)]));
IO_Write(file, encoder(Last(digraphs)));
else
for i in [1 .. Length(digraphs)] do
encoder(file, digraphs[i]);
Expand Down Expand Up @@ -715,7 +714,7 @@ function(filt, s)
maxedges := n * (n - 1) / 2;
if list <> [0] and list <> [1] and
not (Int((maxedges - 1) / 6) + start = Length(list) and
list[Length(list)] mod 2 ^ ((0 - maxedges) mod 6) = 0) then
Last(list) mod 2 ^ ((0 - maxedges) mod 6) = 0) then
ErrorNoReturn("the 2nd argument <s> is not a valid graph6 string,");
fi;

Expand All @@ -732,8 +731,8 @@ function(filt, s)
i := i / 2;
else
edge := FindCoord(pos + 6 - bpos, 0);
out[edge[1]][Length(out[edge[1]]) + 1] := edge[2];
out[edge[2]][Length(out[edge[2]]) + 1] := edge[1];
Add(out[edge[1]], edge[2]);
Add(out[edge[2]], edge[1]);
nredges := nredges + 1;
i := (i - 1) / 2;
fi;
Expand Down Expand Up @@ -2165,7 +2164,7 @@ function(args...)
positions := PositionsProperty(partition, x -> x = i);
joinedPositions := JoinStringsWithSeparator(positions, " ");
partitionString := Concatenation(partitionString, joinedPositions);
if i <> dflabels[Length(dflabels)] then
if i <> Last(dflabels) then
partitionString := Concatenation(partitionString, " | ");
fi;
od;
Expand Down
7 changes: 0 additions & 7 deletions init.g
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ fi;
if not IsBound(Adjacency) then
Adjacency := IdFunc;
fi;
# Avoid warnings with GAP 4.10 for use of FlipBlist
# Can be removed once Digraphs requires GAP>=4.11
if not IsBound(FlipBlist) then
FlipBlist := function(BList)
Apply(BList, x -> not x);
end;
fi;

ReadPackage("digraphs", "gap/digraph.gd");
ReadPackage("digraphs", "gap/digraphs.g");
Expand Down
3 changes: 0 additions & 3 deletions m4/find_gap.m4
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ AC_DEFUN([FIND_GAP],
AC_MSG_ERROR([No GAP_CPPFLAGS is given])
fi

# compatibility with GAP 4.9 (not needed in GAP >= 4.10)
GAP_CPPFLAGS="$GAP_CPPFLAGS -I${GAP_LIB_DIR}/src"

AC_SUBST(GAPARCH)
AC_SUBST(GAPROOT)
AC_SUBST(GAP_CPPFLAGS)
Expand Down
12 changes: 3 additions & 9 deletions makedoc.g
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,9 @@ for Pkg in Concatenation(PkgInfo.Dependencies.NeededOtherPackages,
XMLEntities.(entity_name) := RemovePrefixVersion(Pkg[2]);
od;

# Can change the following line to use Last() once we drop GAP 4.10 support
ARCHIVE_BASENAME := SplitString(PkgInfo.ArchiveURL, "/");
ARCHIVE_BASENAME := ARCHIVE_BASENAME[Length(ARCHIVE_BASENAME)];
XMLEntities.ARCHIVE_BASENAME := ARCHIVE_BASENAME;

ARCHIVENAME := Concatenation(ARCHIVE_BASENAME, PkgInfo.ArchiveFormats);
XMLEntities.ARCHIVENAME := ARCHIVENAME;

XMLEntities.ARCHIVE_BASENAME := Last(SplitString(PkgInfo.ArchiveURL, "/"));
XMLEntities.ARCHIVENAME := Concatenation(XMLEntities.ARCHIVE_BASENAME,
PkgInfo.ArchiveFormats);
XMLEntities.DIGRAPHS := PackageEntity("Digraphs");

for Pkg in Concatenation(PkgInfo.Dependencies.NeededOtherPackages,
Expand Down Expand Up @@ -155,7 +150,6 @@ Unbind(MathOrCode);
Unbind(XMLEntities);
Unbind(PkgInfo);
Unbind(Pkg);
Unbind(ARCHIVENAME);
Unbind(DocDir);
Unbind(Files);
Unbind(Includes);
6 changes: 0 additions & 6 deletions read.g
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ BindGlobal("DIGRAPHS_NautyAvailable",

Unbind(_NautyTracesInterfaceVersion);

# Delete this when we no longer support GAP 4.10
if not CompareVersionNumbers(ReplacedString(GAPInfo.Version, "dev", ""), "4.11")
and not IsBound(INTOBJ_MAX) then
BindGlobal("INTOBJ_MAX", 1152921504606846975);
fi;

ReadPackage("digraphs", "gap/utils.gi");
ReadPackage("digraphs", "gap/digraph.gi");
ReadPackage("digraphs", "gap/constructors.gi");
Expand Down
6 changes: 1 addition & 5 deletions src/gap-includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,4 @@
// GAP headers
#include "gap_all.h" // for Obj, Int
//
#ifdef GAP410_OR_OLDER
#include "compiled.h" // FIXME Remove include when we don't support GAP 4.10
#endif

#endif // DIGRAPHS_SRC_GAP_INCLUDES_H_
#endif // DIGRAPHS_SRC_GAP_INCLUDES_H_
20 changes: 0 additions & 20 deletions src/gap_all.h

This file was deleted.

18 changes: 8 additions & 10 deletions tst/standard/grahom.tst
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,14 @@ Error, the 7th argument <injective> must 0, 1, or 2, not -1,
gap> HomomorphismDigraphsFinder(gr1, gr2, fail, "a", infinity, 2, 1, 0, 0,
> 0, 0);
Error, the 8th argument <image> must be a list or fail, not integer,

# Commented out due to difference in the rmessage for GAP 4.10 vs GAP 4.11
#gap> HomomorphismDigraphsFinder(gr1, gr2, fail, [], 1, 1, 1, [1, []], 0,
#> 0, 0);
#Error, the 8th argument <image> must only contain positive integers, but found\
# list (plain,empty) in position 2,
#gap> HomomorphismDigraphsFinder(gr1, gr2, fail, [], 1, 1, 1, [[], []], 0,
#> 0, 0);
#Error, the 8th argument <image> must only contain positive integers, but found\
# list (plain,empty) in position 1,
gap> HomomorphismDigraphsFinder(gr1, gr2, fail, [], 1, 1, 1, [1, []], 0,
> 0, 0);
Error, the 8th argument <image> must only contain positive integers, but found\
empty plain list in position 2,
gap> HomomorphismDigraphsFinder(gr1, gr2, fail, [], 1, 1, 1, [[], []], 0,
> 0, 0);
Error, the 8th argument <image> must only contain positive integers, but found\
empty plain list in position 1,
gap> HomomorphismDigraphsFinder(gr1, gr2, fail, [], 1, 1, 1, [0, 1], 0, 0,
> 0);
Error, the 8th argument <image> must only contain positive integers, but found\
Expand Down
Loading