Skip to content

Commit

Permalink
Merge branch 'main' into better-nambooripad
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell authored Nov 8, 2024
2 parents 0b5e076 + 317dd11 commit e0bb823
Show file tree
Hide file tree
Showing 31 changed files with 125 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.7
5.4.0
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
PointerAlignment: PAS_Left
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
# removed in the fullness of time.
LDFLAGS: "-pthread"
with:
GAP_PKGS_TO_CLONE: digraphs/digraphs
GAP_PKGS_TO_BUILD: "digraphs io orb datastructures profiling"
GAPBRANCH: ${{ matrix.gap-branch }}
ABI: ${{ matrix.ABI }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2.0
- uses: codespell-project/actions-codespell@v2.1
5 changes: 1 addition & 4 deletions .github/workflows/config-options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
enable-debug:
runs-on: "ubuntu-latest"
env:
GAPBRANCH: "stable-4.12"
ABI: 64
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -44,7 +43,6 @@ jobs:
uses: gap-actions/setup-gap@v2
with:
GAP_PKGS_TO_BUILD: "digraphs io orb datastructures profiling"
GAPBRANCH: stable-4.12
ABI: 64
- name: "Build Semigroups"
uses: gap-actions/build-pkg@v1
Expand All @@ -62,7 +60,6 @@ jobs:
with-external-libsemigroups:
runs-on: "ubuntu-latest"
env:
GAPBRANCH: "stable-4.12"
ABI: 64
PKG_CONFIG_PATH: "/home/runner/micromamba/envs/libsemigroups/lib/pkgconfig:/home/runner/micromamba/envs/libsemigroups/share/pkgconfig/"
LD_LIBRARY_PATH: "/home/runner/micromamba/envs/libsemigroups/lib"
Expand All @@ -73,7 +70,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: "Install conda environment from environment.yml . . ."
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
cache-environment: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: "Install dependencies . . ."
run: sudo pip install gaplint==1.1.3
run: sudo pip install gaplint==1.3.2
- name: "Run gaplint . . ."
run: bash etc/gaplint.sh

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v4
- name: "Install dependencies (macOS only!)"
if: ${{ runner.os == 'macOS' }}
run: brew install automake
run: brew install automake autoconf zlib gmp pkg-config libtool
# Setup ccache, to speed up repeated compilation of the same binaries
# (i.e., GAP and the packages)
- name: "Setup ccache"
Expand Down
7 changes: 6 additions & 1 deletion .mailmap
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Marina Anagnostopoulou-Merkouri <marina.anagnostopoulou-merkouri@bristol.ac.uk> Marina Anagnostopoulou-Merkouri <mam49@st-andrews.ac.uk>
Stuart Burrell <stuartburrell1994@gmail.com> <stuartburrell@users.noreply.github.com>
Stuart Burrell <stuartburrell1994@gmail.com> stuartburrell <unknown>
Reinis Cirpons <rc234@st-andrews.ac.uk> Reinis Cirpons <43414125+reiniscirpons@users.noreply.github.com>
Expand All @@ -8,8 +9,10 @@ Joseph Edwards <jde1@st-andrews.ac.uk> Joe Edwards <80713360+Joseph-Edwards@user
Joseph Edwards <jde1@st-andrews.ac.uk> Joseph Edwards <josephdavidedwards@gmail.com>
Luke Elliott <le27@st-andrews.ac.uk> le27 <le27@st-andrews.ac.uk>
Fernando Flores Brito <ffloresbrito@gmail.com> Fernando Flores Brito <ffb3@st-andrews.ac.uk>
Tillman Froehlich <trf1@st-andrews.ac.uk> <47321884+awesometillman@users.noreply.github.com>
Nick Ham <nicholas.charles.ham@gmail.com>
Robert Hancock <hancock@informatik.uni-heidelberg.de> Robert Hancock <unknown>
Robert Hancock <robert.hancock@maths.ox.ac.uk> Robert Hancock <hancock@informatik.uni-heidelberg.de>
Robert Hancock <robert.hancock@maths.ox.ac.uk> Robert Hancock <unknown>
Max Horn <horn@mathematik.uni-kl.de> Max Horn <max@quendi.de>
Chris Jefferson <caj21@st-andrews.ac.uk> Chris Jefferson <chris@bubblescope.net>
Julius Jonusas <j.jonusas@gmail.com> Julius <jj252@st-andrews.ac.uk>
Expand All @@ -19,6 +22,7 @@ Olexandr Konovalov <obk1@st-andrews.ac.uk> Alexander Konovalov <alex-konovalov@u
Olexandr Konovalov <obk1@st-andrews.ac.uk> Alexander Konovalov <alexk@mcs.st-andrews.ac.uk>
Olexandr Konovalov <obk1@st-andrews.ac.uk> Olexandr Konovalov <5751387+olexandr-konovalov@users.noreply.github.com>
Artemis Konstantinidi <ak316@st-andrews.ac.uk> artemiskonst <97620468+artemiskonst@users.noreply.github.com>
Hyeokjun Kwon <hk78@st-andrews.ac.uk> Hyeokjun Kwon <rnjsgurwns27@gmail.com>
James Mitchell <jdm3@st-andrews.ac.uk> <jdm3@st-and.ac.uk>
James Mitchell <jdm3@st-andrews.ac.uk> <jdm3@st-andrews.ac.uk>
James Mitchell <jdm3@st-andrews.ac.uk> <jenkyfunds@gmail.com>
Expand All @@ -39,6 +43,7 @@ Chris Wensley <cdwensley.maths@btinternet.com> cdwensley <cdwensley.maths@btinte
Murray Whyte <mw231@st-andrews.ac.uk> Murray Whyte <42549861+MTWhyte@users.noreply.github.com>
Wilf Wilson <gap@wilf-wilson.net> Wilf Wilson <wilf@wilf-wilson.net>
Wilf Wilson <gap@wilf-wilson.net> wilfwilson <wilf@wilf-wilson.net>
Tianrun Yang <ty39@st-andrews.ac.uk> Tianrun Yang <117233646+Tianrun-Y@users.noreply.github.com>
Michael Young <mct25@st-andrews.ac.uk> <mct25@st-andrews.ac.uk>
Michael Young <mct25@st-andrews.ac.uk> <mtorpey@mtorpey-debtest>
Michael Young <mct25@st-andrews.ac.uk> mct25 <unknown>
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ Copyright © 2011-2024 [James D. Mitchell][] et al.

Licensing information can be found in the `LICENSE` file.

## Version 5.4.0 (released 19/10/2024)

## What's Changed

* Improved IsIsomorphicSemigroup Method by @awesometillman in https://github.com/semigroups/Semigroups/pull/1023
* fix typo in nambooripad partial order documentation by @Tianrun-Y in https://github.com/semigroups/Semigroups/pull/1030
* Better kernel module checking by @Joseph-Edwards in https://github.com/semigroups/Semigroups/pull/1032
* Fix ChooseHashFunction rank issue. by @reiniscirpons in https://github.com/semigroups/Semigroups/pull/1035
* kernel: Semigroups can be used in GAP on julia by @james-d-mitchell in https://github.com/semigroups/Semigroups/pull/1036
* Use LoadKernelExtension for gapbind_demo by @fingolfin in https://github.com/semigroups/Semigroups/pull/1039

## New Contributors
* @awesometillman made their first contribution in https://github.com/semigroups/Semigroups/pull/1023
* @Tianrun-Y made their first contribution in https://github.com/semigroups/Semigroups/pull/1030

**Full Changelog**: https://github.com/semigroups/Semigroups/compare/v5.3.7...v5.4.0

## Version 5.3.7 (released 11/03/2024)

This is a minor release with some changes for compatibility with GAP.
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ lint:
etc/cpplint.sh

format:
clang-format -i src/*.[hc]
clang-format -i src/*.*pp

.PHONY: lint format

Expand Down
65 changes: 35 additions & 30 deletions PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ _STANDREWSCS := Concatenation(["Jack Cole Building, North Haugh, ",
SetPackageInfo(rec(
PackageName := "Semigroups",
Subtitle := "A package for semigroups and monoids",
Version := "5.3.7",
Date := "11/03/2024", # dd/mm/yyyy format
Version := "5.4.0",
Date := "19/10/2024", # dd/mm/yyyy format
License := "GPL-3.0-or-later",

ArchiveFormats := ".tar.gz",
Expand Down Expand Up @@ -71,11 +71,10 @@ Persons := [
FirstNames := "Marina",
IsAuthor := true,
IsMaintainer := false,
Email := "mam49@st-andrews.ac.uk",
PostalAddress := _STANDREWSMATHS,
Place := "St Andrews",
Institution := "University of St Andrews",
WWWHome := "https://github.com/marinaanagno"),
Email := "marina.anagnostopoulou-merkouri@bristol.ac.uk",
Place := "Bristol",
Institution := "University of Bristol",
WWWHome := "https://marinaanagno.github.io"),

rec(
LastName := "Breuer",
Expand Down Expand Up @@ -149,8 +148,14 @@ Persons := [
FirstNames := "Fernando",
IsAuthor := true,
IsMaintainer := false,
Email := "ffloresbrito@gmail.com",
WWWHome := "https://github.com/ffloresbrito"),
Email := "ffloresbrito@gmail.com"),

rec(
LastName := "Froehlich",
FirstNames := "Tillman",
IsAuthor := true,
IsMaintainer := false,
Email := "trf1@st-andrews.ac.uk"),

rec(
LastName := "Ham",
Expand All @@ -167,7 +172,7 @@ Persons := [
FirstNames := "Robert",
IsAuthor := true,
IsMaintainer := false,
Email := "hancock@informatik.uni-heidelberg.de",
Email := "robert.hancock@maths.ox.ac.uk",
WWWHome := "https://sites.google.com/view/robert-hancock/"),

rec(
Expand Down Expand Up @@ -210,11 +215,7 @@ Persons := [
LastName := "Nagpal",
FirstNames := "Chinmaya",
IsAuthor := true,
IsMaintainer := false,
Email := "chinmaya1011@gmail.com",
PostalAddress := _STANDREWSMATHS,
Place := "St Andrews",
Institution := "University of St Andrews"),
IsMaintainer := false),

rec(
LastName := "Konovalov",
Expand All @@ -231,11 +232,13 @@ Persons := [
LastName := "Konstantinidi",
FirstNames := "Artemis",
IsAuthor := true,
IsMaintainer := false,
Email := "ak316@st-andrews.ac.uk",
PostalAddress := _STANDREWSMATHS,
Place := "St Andrews",
Institution := "University of St Andrews"),
IsMaintainer := false),

rec(
LastName := "Kwon",
FirstNames := "Hyeokjun",
IsAuthor := true,
IsMaintainer := false),

rec(
LastName := "Pasechnik",
Expand All @@ -257,7 +260,7 @@ Persons := [
IsAuthor := true,
IsMaintainer := false,
Email := "markus.pfeiffer@morphism.de",
WWWHome := "https://www.morphism.de/~markusp/"),
WWWHome := "https://markusp.morphism.de/"),

rec(
LastName := "Russell",
Expand Down Expand Up @@ -295,8 +298,7 @@ Persons := [
LastName := "Spiers",
FirstNames := "Ben",
IsAuthor := true,
IsMaintainer := false,
Email := "bspiers972@outlook.com"),
IsMaintainer := false),

rec(
LastName := "Thiéry",
Expand Down Expand Up @@ -344,6 +346,12 @@ Persons := [
Email := "gap@wilf-wilson.net",
WWWHome := "https://wilf.me"),

rec(
LastName := "Yang",
FirstNames := "Tianrun",
IsAuthor := true,
IsMaintainer := false),

rec(
LastName := "Young",
FirstNames := "Michael",
Expand Down Expand Up @@ -375,7 +383,7 @@ PackageDoc := rec(
),

Dependencies := rec(
GAP := ">=4.12.0",
GAP := ">=4.12.1",
NeededOtherPackages := [["datastructures", ">=0.2.5"],
["digraphs", ">=1.6.2"],
["genss", ">=1.6.5"],
Expand Down Expand Up @@ -406,13 +414,10 @@ BannerString := Concatenation(
"------\n"),

AvailabilityTest := function()
local semigroups_so;
semigroups_so := Filename(DirectoriesPackagePrograms("semigroups"),
"semigroups.so");
if (not "semigroups" in SHOW_STAT()) and semigroups_so = fail then
if not IsKernelExtensionAvailable("semigroups") then
LogPackageLoadingMessage(PACKAGE_WARNING,
"the kernel module is not compiled, ",
"the package cannot be loaded.");
["the kernel module is not compiled, ",
"the package cannot be loaded."]);
return fail;
fi;
return true;
Expand Down
1 change: 1 addition & 0 deletions VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
##
##

release 5.4.0 - 19/10/2024
release 5.3.7 - 11/03/2024
release 5.3.6 - 19/02/2024
release 5.3.5 - 14/02/2024
Expand Down
2 changes: 1 addition & 1 deletion doc/attr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ true]]></Example>

<C>NambooripadPartialOrder</C> returns the Nambooripad partial order on the
regular semigroup <A>S</A> as a list of sets of positive integers where
entry <C>i</C> in <C>NaturalPartialOrder(<A>S</A>)</C> is the set of
entry <C>i</C> in <C>NambooripadPartialOrder(<A>S</A>)</C> is the set of
positions in <C>Elements(<A>S</A>)</C> of elements which are less than
<C>Elements(<A>S</A>)[i]</C>. See also <Ref
Func="NambooripadLeqRegularSemigroup"/>.
Expand Down
30 changes: 20 additions & 10 deletions etc/code-coverage-test-gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,29 @@
_DIR = tempfile.mkdtemp()
print(f"{_INFO_PREFIX}Using temporary directory: {_DIR}\033[0m")

_COMMANDS = 'echo "'
_COMMANDS += "".join(rf"Test(\"{f}\");;\n" for f in _ARGS.tstfiles)
_COMMANDS += rf"""UncoverageLineByLine();;
LoadPackage(\"profiling\", false);;
filesdir := \"{getcwd()}{_PROFILE_DIR}\";;\n"""

_COMMANDS += rf"outdir := \"{_DIR}\";;\n"
_COMMANDS += rf"x := ReadLineByLineProfile(\"{_DIR}/profile.gz\");;\n"
_COMMANDS += 'OutputAnnotatedCodeCoverageFiles(x, filesdir, outdir);"'
# Raw strings are used to correctly escape quotes " for input in another
# process, i.e. we explicitly need the string to contain \" instead of just "
# for each quote.
_GAP_COMMANDS = [rf"Test(\"{f}\");;" for f in _ARGS.tstfiles]
_GAP_COMMANDS.extend(
[
"UncoverageLineByLine();;",
rf"LoadPackage(\"profiling\", false);;",
rf"filesdir := \"{getcwd()}{_PROFILE_DIR}\";;",
rf"outdir := \"{_DIR}\";;",
rf"x := ReadLineByLineProfile(\"{_DIR}/profile.gz\");;",
"OutputAnnotatedCodeCoverageFiles(x, filesdir, outdir);",
]
)

_RUN_GAP = f"{_ARGS.gap_root}/gap -A -m 1g -T --cover {_DIR}/profile.gz"

with subprocess.Popen(_COMMANDS, stdout=subprocess.PIPE, shell=True) as pro1:
# Commands are stored in a list and then joined with "\n" since including
# newlines directly in raw strings cause issues when piping into GAP on some
# platforms.
with subprocess.Popen(
'echo "' + "\n".join(_GAP_COMMANDS) + '"', stdout=subprocess.PIPE, shell=True
) as pro1:
try:
with subprocess.Popen(_RUN_GAP, stdin=pro1.stdout, shell=True) as pro2:
pro2.wait()
Expand Down
2 changes: 1 addition & 1 deletion etc/cpplint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -e

cpplint src/*.hpp src/*.h src/*.cpp
cpplint src/*.*pp
2 changes: 1 addition & 1 deletion gap/attributes/properties.gd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ DeclareOperation("IsNormalInverseSubsemigroup",
[IsInverseSemigroup, IsInverseSemigroup]);

if not IsBoundGlobal("IsSelfDualSemigroup") then
DeclareProperty("IsSelfDualSemigroup", IsSemigroup and CanUseFroidurePin);
DeclareProperty("IsSelfDualSemigroup", IsSemigroup);
fi;

DeclareSynonymAttr("IsRectangularGroup",
Expand Down
2 changes: 1 addition & 1 deletion gap/attributes/rms-translat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ function(T)
od;

for a in group_gens do
fa := function(x)
fa := function(x) # gaplint: disable=W047
if x = 1 then
return a;
fi;
Expand Down
13 changes: 2 additions & 11 deletions gap/elements/maxplusmat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,9 @@ end);
InstallMethod(UnweightedPrecedenceDigraph, "for a max-plus matrix",
[IsMaxPlusMatrix],
function(mat)
local adj;
# Auxiliary function used to compute the adjacency matrix of the precedence
# digraph
adj := function(i, j)
if mat[i][j] = -infinity then
return false;
else
return true;
fi;
end;
# Generate and return digraph object
return Digraph([1 .. DimensionOfMatrixOverSemiring(mat)], adj);
return Digraph([1 .. DimensionOfMatrixOverSemiring(mat)],
{i, j} -> mat[i][j] <> -infinity);
end);

## Method from lemma 19, page 36, of:
Expand Down
2 changes: 1 addition & 1 deletion gap/libsemigroups/cong.gi
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ function(cong, elm)
elif IsFpSemigroup(Range(cong))
or (HasIsFreeSemigroup(Range(cong)) and IsFreeSemigroup(Range(cong)))
or IsFpMonoid(Range(cong))
or (HasIsFreeSemigroup(Range(cong)) and IsFreeMonoid(Range(cong)))
or (HasIsFreeMonoid(Range(cong)) and IsFreeMonoid(Range(cong)))
or IsQuotientSemigroup(Range(cong)) then
part := EquivalenceRelationPartition(cong);
pos := PositionProperty(part, l -> [elm, l[1]] in cong);
Expand Down
Loading

0 comments on commit e0bb823

Please sign in to comment.