From 31a5805a814c2b8b9e739b59a20c4b15d3c63d8d Mon Sep 17 00:00:00 2001 From: James Mitchell Date: Fri, 24 May 2024 09:36:04 +0100 Subject: [PATCH 01/19] ci: install libtool for macosx (#1012) * ci: install libtool for macosx * ci: add gap stable-4.13 to ci.yml * ci: exclude macos / GAP 4.12 --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f830c8dd8..f1043f52c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,14 +26,21 @@ jobs: gap-branch: - master - stable-4.12 + - stable-4.13 ABI: - 64 + exclude: + # We exclude this combination for the reasons discussed at: + # https://github.com/semigroups/Semigroups/pull/1015 + # https://github.com/gap-system/gap/issues/5640 + - os: macos + gap-branch: stable-4.12 steps: - uses: actions/checkout@v4 - name: "Install dependencies (macOS only!)" if: ${{ runner.os == 'macOS' }} - run: brew install automake + run: brew install automake libtool # Setup ccache, to speed up repeated compilation of the same binaries # (i.e., GAP and the packages) - name: "Setup ccache" From e8f3c7e956bf0aec8f56684289ef267258a287fb Mon Sep 17 00:00:00 2001 From: Chris Jefferson Date: Thu, 23 May 2024 11:29:10 +0800 Subject: [PATCH 02/19] Fix my website --- CHANGELOG.md | 2 +- PackageInfo.g | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b06708d93..07763b937 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1617,7 +1617,7 @@ added the functions `CitrusDefaultMem`, `CitrusHiMem`, [Michael Young]: https://mct25.host.cs.st-andrews.ac.uk [Nick Ham]: https://n-ham.github.io [Wilf A. Wilson]: https://wilf.me -[Chris Jefferson]: https://caj.host.cs.st-andrews.ac.uk/ +[Chris Jefferson]: https://heather.cafe [Finn Smith]: https://flsmith.github.io [Luke Elliott]: https://le27.github.io/Luke-Elliott/ [GAP]: https://www.gap-system.org diff --git a/PackageInfo.g b/PackageInfo.g index 26effbfe5..811c48dd5 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -192,7 +192,7 @@ Persons := [ IsAuthor := true, IsMaintainer := false, Email := "caj21@st-andrews.ac.uk", - WWWHome := "https://caj.host.cs.st-andrews.ac.uk/", + WWWHome := "https://heather.cafe/", PostalAddress := _STANDREWSCS, Place := "St Andrews", Institution := "University of St Andrews"), From a6bb1150bc9aa37c46ceb01e04c90507f5580722 Mon Sep 17 00:00:00 2001 From: Chris Jefferson Date: Thu, 23 May 2024 11:28:00 +0800 Subject: [PATCH 03/19] Add packages to avoid GAP having to build things itself --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1043f52c..f53b931af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v4 - name: "Install dependencies (macOS only!)" if: ${{ runner.os == 'macOS' }} - run: brew install automake libtool + 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" From 0f11e6964d1102cd0c7f492f03fca50d34b8338c Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Fri, 24 May 2024 09:45:07 +0100 Subject: [PATCH 04/19] Fix spelling for new codespell version --- .codespellrc | 2 +- gap/fp/freeband.gi | 6 +++--- gap/fp/freeinverse.gd | 2 +- gap/fp/freeinverse.gi | 2 +- gap/semigroups/grpperm.gd | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.codespellrc b/.codespellrc index 551d67c11..c2c375755 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,3 +1,3 @@ [codespell] skip = ./.git,./tmp,./gapbind14,./libsemigroups,./tst,./bin,./libtool,configure,configure~,config.guess,./gh-pages,./autom4te.cache,./cnf,aclocal.m4,./m4,./doc/*.log,./doc/*.html,./doc/*.txt,./doc/*.six,./doc/*.js,./doc/*.bbl,./doc/*.tex,./doc/*.bib -ignore-words-list=yse,alph,Alph,lits,bu,ser,wit,documen,ines,manuel +ignore-words-list=yse,alph,Alph,lits,bu,ser,wit,documen,ines,manuel,combin diff --git a/gap/fp/freeband.gi b/gap/fp/freeband.gi index b47de2793..16fdb5653 100644 --- a/gap/fp/freeband.gi +++ b/gap/fp/freeband.gi @@ -3,7 +3,7 @@ ## fp/freeband.gi ## Copyright (C) 2013-2022 Julius Jonusas ## -## Licensing information can be foundin the README file of this package. +## Licensing information can be found in the README file of this package. ## ############################################################################### @@ -52,7 +52,7 @@ SEMIGROUPS.FreeBandElmToWord := function(elem) first := tuple![1]; pre_tuple := tuple![2]; # tuple corresponding to the prefix last := tuple![3]; - su_tuple := tuple![4]; # tuple corresponding to the sufix + su_tuple := tuple![4]; # tuple corresponding to the suffix # if first = last we only need a single letter if first = last then @@ -418,7 +418,7 @@ function(x, y) type := TypeObj(x); # if the content of two elements is the same we only need the prefix of the - # first and the sufix of the second one + # first and the suffix of the second one # cont = blist if IsSubsetBlist(x!.cont, y!.cont) then out := [x!.tuple[1], x!.tuple[2]]; diff --git a/gap/fp/freeinverse.gd b/gap/fp/freeinverse.gd index e2a6f7d69..80728549a 100644 --- a/gap/fp/freeinverse.gd +++ b/gap/fp/freeinverse.gd @@ -3,7 +3,7 @@ ## fp/freeinverse.gd ## Copyright (C) 2013-2022 Julius Jonusas ## -## Licensing information can be foundin the README file of this package. +## Licensing information can be found in the README file of this package. ## ############################################################################### diff --git a/gap/fp/freeinverse.gi b/gap/fp/freeinverse.gi index 7872d45e1..4d367d5d6 100644 --- a/gap/fp/freeinverse.gi +++ b/gap/fp/freeinverse.gi @@ -3,7 +3,7 @@ ## fp/freeinverse.gi ## Copyright (C) 2013-2022 Julius Jonusas ## -## Licensing information can be foundin the README file of this package. +## Licensing information can be found in the README file of this package. ## ############################################################################### ## diff --git a/gap/semigroups/grpperm.gd b/gap/semigroups/grpperm.gd index b633db4a8..91ffa971c 100644 --- a/gap/semigroups/grpperm.gd +++ b/gap/semigroups/grpperm.gd @@ -3,7 +3,7 @@ ## semigroups/grpperm.gd ## Copyright (C) 2014-2022 James D. Mitchell ## -## Licensing information can be foundin the README file of this package. +## Licensing information can be found in the README file of this package. ## ############################################################################# ## From 133d7f7b53068a8a02d8d6b13cc99668b6e15600 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Sat, 3 Jun 2023 11:47:53 +0100 Subject: [PATCH 05/19] cong: fix typo in ImagesElm --- gap/libsemigroups/cong.gi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gap/libsemigroups/cong.gi b/gap/libsemigroups/cong.gi index 4f0f4e478..68c338e66 100644 --- a/gap/libsemigroups/cong.gi +++ b/gap/libsemigroups/cong.gi @@ -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); From 7c6fa1fa60e835ab26ebd000aa889da74aaa1824 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Mon, 29 Jul 2024 11:25:09 +0100 Subject: [PATCH 06/19] Don't try to read non-existent file This should resolve #1022 --- read.g | 1 - 1 file changed, 1 deletion(-) diff --git a/read.g b/read.g index f89150a42..d189d3f46 100644 --- a/read.g +++ b/read.g @@ -11,7 +11,6 @@ ReadPackage("semigroups", "gap/tools/display.gi"); ReadPackage("semigroups", "gap/tools/io.gi"); ReadPackage("semigroups", "gap/tools/utils.gi"); -ReadPackage("semigroups", "gap/tools/enums.gi"); ReadPackage("semigroups", "gap/tools/iterators.gi"); ReadPackage("semigroups", "gap/elements/star.gi"); From 9bac2d84c484897778f3f0ac69d553303e433558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 02:25:51 +0000 Subject: [PATCH 07/19] build(deps): bump codespell-project/actions-codespell from 2.0 to 2.1 Bumps [codespell-project/actions-codespell](https://github.com/codespell-project/actions-codespell) from 2.0 to 2.1. - [Release notes](https://github.com/codespell-project/actions-codespell/releases) - [Commits](https://github.com/codespell-project/actions-codespell/compare/v2.0...v2.1) --- updated-dependencies: - dependency-name: codespell-project/actions-codespell dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/codespell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 6c48a057f..5542a0e59 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -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 From ff54965bc5b5b784f50f11fdaaab7f1cf1932656 Mon Sep 17 00:00:00 2001 From: Reinis Cirpons <43414125+reiniscirpons@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:46:52 +0100 Subject: [PATCH 08/19] Fix GAP coverage script newline issue (#1029) Co-authored-by: James Mitchell --- etc/code-coverage-test-gap.py | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/etc/code-coverage-test-gap.py b/etc/code-coverage-test-gap.py index e50ea5a89..f52bbdf31 100755 --- a/etc/code-coverage-test-gap.py +++ b/etc/code-coverage-test-gap.py @@ -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() From 7017ff34175549b149d27a51e5efc99f502869b5 Mon Sep 17 00:00:00 2001 From: Tianrun Yang <117233646+Tianrun-Y@users.noreply.github.com> Date: Thu, 22 Aug 2024 20:17:59 +0100 Subject: [PATCH 09/19] fix typo (#1030) --- doc/attr.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/attr.xml b/doc/attr.xml index 63cafcd12..f576823cc 100644 --- a/doc/attr.xml +++ b/doc/attr.xml @@ -1292,7 +1292,7 @@ true]]> NambooripadPartialOrder returns the Nambooripad partial order on the regular semigroup S as a list of sets of positive integers where - entry i in NaturalPartialOrder(S) is the set of + entry i in NambooripadPartialOrder(S) is the set of positions in Elements(S) of elements which are less than Elements(S)[i]. See also . From 83e428d22dbf22357e9ca96adb71f0d1c5abff46 Mon Sep 17 00:00:00 2001 From: Joe Edwards <80713360+Joseph-Edwards@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:27:40 +0100 Subject: [PATCH 10/19] Better kernel module checking (#1032) * Better kernel module checking * fix linting * better error messages * fix linting * fix linting again * Change Semigroups -> semigroups --- PackageInfo.g | 11 ++++------- init.g | 10 ++-------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/PackageInfo.g b/PackageInfo.g index 811c48dd5..1365f7bc5 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -375,7 +375,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"], @@ -406,13 +406,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; diff --git a/init.g b/init.g index 94a5aa193..1c01899ef 100644 --- a/init.g +++ b/init.g @@ -13,15 +13,9 @@ if not IsBound(ORBC) then BindGlobal("HTValue_TreeHash_C", fail); fi; -# the kernel module makes use of the c functions HTAdd_TreeHash_C and -# HTValue_TreeHash_C and so we should only use the part of the kernel module -# using these functions if Orb is compiled. -_SEMIGROUPS_SO := Filename(DirectoriesPackagePrograms("semigroups"), - "semigroups.so"); -if _SEMIGROUPS_SO <> fail then - LoadDynamicModule(_SEMIGROUPS_SO); +if LoadKernelExtension("semigroups") = false then + Error("failed to load Semigroups kernel extension"); fi; -Unbind(_SEMIGROUPS_SO); if not IsBound(UserHomeExpand) then BindGlobal("UserHomeExpand", USER_HOME_EXPAND); From 323f9492a4ccfc3278b5d36e69a1a7a4423419fd Mon Sep 17 00:00:00 2001 From: reiniscirpons Date: Fri, 30 Aug 2024 10:14:49 +0100 Subject: [PATCH 11/19] Fix ChooseHashFunction rank issue. --- gap/main/setup.gi | 1 - 1 file changed, 1 deletion(-) diff --git a/gap/main/setup.gi b/gap/main/setup.gi index 5a1af9de5..550bc798c 100644 --- a/gap/main/setup.gi +++ b/gap/main/setup.gi @@ -1030,7 +1030,6 @@ end); InstallMethod(ChooseHashFunction, "for an object and an int", [IsObject, IsInt], -1, {p, hashlen} -> rec(func := {v, data} -> 1, data := fail)); # The next two methods are more general than might seem necessary but From 3fa9f22e3dcf6d8b6c5cbeb5781d8eaacece5a44 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Fri, 30 Aug 2024 16:05:12 +0100 Subject: [PATCH 12/19] kernel: Semigroups can be used in GAP on julia --- gapbind14/include/gapbind14/gapbind14.hpp | 2 ++ gapbind14/src/gapbind14.cpp | 12 +++++++++--- src/pkg.cpp | 8 ++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/gapbind14/include/gapbind14/gapbind14.hpp b/gapbind14/include/gapbind14/gapbind14.hpp index 86200ea3c..bbb7a37b2 100644 --- a/gapbind14/include/gapbind14/gapbind14.hpp +++ b/gapbind14/include/gapbind14/gapbind14.hpp @@ -248,11 +248,13 @@ namespace gapbind14 { (Int) detail::to_string(o).c_str()); } +#ifdef GAP_ENABLE_SAVELOAD void save(Obj o) { SaveUInt(detail::obj_subtype(o)); } void load(Obj o) const; +#endif void free(Obj o) const { _subtypes.at(detail::obj_subtype(o))->free(o); diff --git a/gapbind14/src/gapbind14.cpp b/gapbind14/src/gapbind14.cpp index 8a3644543..16e873fb7 100644 --- a/gapbind14/src/gapbind14.cpp +++ b/gapbind14/src/gapbind14.cpp @@ -26,7 +26,7 @@ #include "gapbind14/gap_include.hpp" // for Obj etc #define GVAR_ENTRY(srcfile, name, nparam, params) \ - { #name, nparam, params, (GVarFunc) name, srcfile ":Func" #name } + {#name, nparam, params, (GVarFunc) name, srcfile ":Func" #name} namespace gapbind14 { UInt T_GAPBIND14_OBJ = 0; @@ -129,11 +129,13 @@ namespace gapbind14 { } return it->second; } +#ifdef GAP_ENABLE_SAVELOAD void Module::load(Obj o) const { gapbind14_subtype sbtyp = LoadUInt(); ADDR_OBJ(o)[0] = reinterpret_cast(sbtyp); ADDR_OBJ(o)[1] = static_cast(nullptr); } +#endif void Module::finalize() { for (auto &x : _mem_funcs) { @@ -158,6 +160,7 @@ namespace gapbind14 { module().print(o); } +#ifdef GAP_ENABLE_SAVELOAD void TGapBind14ObjSaveFunc(Obj o) { module().save(o); } @@ -165,6 +168,7 @@ namespace gapbind14 { void TGapBind14ObjLoadFunc(Obj o) { module().load(o); } +#endif Obj TGapBind14ObjCopyFunc(Obj o, Int mut) { return o; @@ -254,8 +258,10 @@ namespace gapbind14 { PKG_TNUM = RegisterPackageTNUM("TGapBind14", TGapBind14ObjTypeFunc); PrintObjFuncs[PKG_TNUM] = TGapBind14ObjPrintFunc; - SaveObjFuncs[PKG_TNUM] = TGapBind14ObjSaveFunc; - LoadObjFuncs[PKG_TNUM] = TGapBind14ObjLoadFunc; +#ifdef GAP_ENABLE_SAVELOAD + SaveObjFuncs[PKG_TNUM] = TGapBind14ObjSaveFunc; + LoadObjFuncs[PKG_TNUM] = TGapBind14ObjLoadFunc; +#endif CopyObjFuncs[PKG_TNUM] = &TGapBind14ObjCopyFunc; CleanObjFuncs[PKG_TNUM] = &TGapBind14ObjCleanFunc; diff --git a/src/pkg.cpp b/src/pkg.cpp index 8b0c8fc3f..ae8317854 100644 --- a/src/pkg.cpp +++ b/src/pkg.cpp @@ -276,6 +276,8 @@ Obj TBlocksObjTypeFunc(Obj o) { return TheTypeTBlocksObj; } +#ifdef GAP_ENABLE_SAVELOAD + void TBipartObjSaveFunc(Obj o) { Bipartition* b = bipart_get_cpp(o); SaveUInt4(b->degree()); @@ -332,6 +334,8 @@ void TBlocksObjLoadFunc(Obj o) { ADDR_OBJ(o)[0] = reinterpret_cast(blocks); } +#endif + // Filters for IS_BIPART, IS_BLOCKS Obj IsBipartFilt; @@ -500,8 +504,10 @@ static Int InitKernel(StructInitInfo* module) { CleanObjFuncs[T_BIPART] = &TBipartObjCleanFunc; IsMutableObjFuncs[T_BIPART] = &AlwaysNo; +#ifdef GAP_ENABLE_SAVELOAD SaveObjFuncs[T_BIPART] = TBipartObjSaveFunc; LoadObjFuncs[T_BIPART] = TBipartObjLoadFunc; +#endif InitMarkFuncBags(T_BIPART, &MarkAllButFirstSubBags); InitFreeFuncBag(T_BIPART, &TBipartObjFreeFunc); @@ -520,8 +526,10 @@ static Int InitKernel(StructInitInfo* module) { CleanObjFuncs[T_BLOCKS] = &TBlocksObjCleanFunc; IsMutableObjFuncs[T_BLOCKS] = &AlwaysNo; +#ifdef GAP_ENABLE_SAVELOAD SaveObjFuncs[T_BLOCKS] = TBlocksObjSaveFunc; LoadObjFuncs[T_BLOCKS] = TBlocksObjLoadFunc; +#endif InitMarkFuncBags(T_BLOCKS, &MarkNoSubBags); InitFreeFuncBag(T_BLOCKS, &TBlocksObjFreeFunc); From d03e24950681bc1db8e249a05fd136f9eb790498 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Sat, 31 Aug 2024 14:33:58 +0100 Subject: [PATCH 13/19] Try fix ci --- .github/workflows/ci.yml | 1 + .github/workflows/config-options.yml | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f53b931af..e5b27c3ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.github/workflows/config-options.yml b/.github/workflows/config-options.yml index b81965542..6067886eb 100644 --- a/.github/workflows/config-options.yml +++ b/.github/workflows/config-options.yml @@ -10,7 +10,6 @@ jobs: enable-debug: runs-on: "ubuntu-latest" env: - GAPBRANCH: "stable-4.12" ABI: 64 steps: - uses: actions/checkout@v4 @@ -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 @@ -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" From 9e06a115db680585e6e2a87f980b591ddaa47105 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Sat, 31 Aug 2024 13:06:37 +0100 Subject: [PATCH 14/19] Update for recent gaplint --- .github/workflows/lint.yml | 2 +- gap/attributes/rms-translat.gi | 2 +- gap/elements/maxplusmat.gi | 13 ++----------- gap/main/lambda-rho.gi | 4 ++-- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 675dd6bb1..9fcbe8bf7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/gap/attributes/rms-translat.gi b/gap/attributes/rms-translat.gi index 42d29980a..445d2d033 100644 --- a/gap/attributes/rms-translat.gi +++ b/gap/attributes/rms-translat.gi @@ -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; diff --git a/gap/elements/maxplusmat.gi b/gap/elements/maxplusmat.gi index 58da95e61..b648b66b9 100644 --- a/gap/elements/maxplusmat.gi +++ b/gap/elements/maxplusmat.gi @@ -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: diff --git a/gap/main/lambda-rho.gi b/gap/main/lambda-rho.gi index f613e2527..ef3ab5374 100644 --- a/gap/main/lambda-rho.gi +++ b/gap/main/lambda-rho.gi @@ -110,7 +110,7 @@ function(o, m, i) genpos := ReverseSchreierTreeOfSCC(o, m); inv := LambdaInverse(o!.parent); - trace := function(i) # gaplint: disable=W000 + trace := function(i) # gaplint: disable=W047 local x; if IsBound(mults[i]) then return mults[i][2]; @@ -366,7 +366,7 @@ function(o, m) genpos := SchreierTreeOfSCC(o, m); inv := x -> RhoInverse(o!.parent)(o[scc[1]], x); - trace := function(i) # gaplint: disable=W000 + trace := function(i) # gaplint: disable=W047 local x; if IsBound(mults[i]) then return mults[i][1]; From db2bd96f535dc5e6c45e0a3af65c0e31b24643c7 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 9 Sep 2024 17:53:45 +0200 Subject: [PATCH 15/19] Use LoadKernelExtension for gapbind_demo --- gapbind14/demo/init.g | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gapbind14/demo/init.g b/gapbind14/demo/init.g index a6f6712d3..7a9a56845 100644 --- a/gapbind14/demo/init.g +++ b/gapbind14/demo/init.g @@ -3,11 +3,9 @@ # # Reading the declaration part of the package. # -_PATH_SO:=Filename(DirectoriesPackagePrograms("gapbind_demo"), "gapbind_demo.so"); -if _PATH_SO <> fail then - LoadDynamicModule(_PATH_SO); +if LoadKernelExtension("gapbind_demo") = false then + Error("failed to load gapbind_demo kernel extension"); fi; -Unbind(_PATH_SO); if not IsBoundGlobal("IsTGapBind14Obj") then DeclareCategory("IsTGapBind14Obj", IsObject); From d6c7d19b078b5af28bc66a1a35a7f7b12d812051 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 02:28:51 +0000 Subject: [PATCH 16/19] build(deps): bump mamba-org/setup-micromamba from 1 to 2 Bumps [mamba-org/setup-micromamba](https://github.com/mamba-org/setup-micromamba) from 1 to 2. - [Release notes](https://github.com/mamba-org/setup-micromamba/releases) - [Commits](https://github.com/mamba-org/setup-micromamba/compare/v1...v2) --- updated-dependencies: - dependency-name: mamba-org/setup-micromamba dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/config-options.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/config-options.yml b/.github/workflows/config-options.yml index 6067886eb..60fda3527 100644 --- a/.github/workflows/config-options.yml +++ b/.github/workflows/config-options.yml @@ -70,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 From c7f40a00e62aac7a54c7e7b9b1e6e46b905bd2dc Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Sat, 19 Oct 2024 12:06:28 +0100 Subject: [PATCH 17/19] ci: update deps in mac os x extended --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ce5cf794..a062c851e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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" From 265de04a5fa4ef7674b03519d30abce9abce3538 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Thu, 17 Oct 2024 14:53:21 +0100 Subject: [PATCH 18/19] Update version numbers etc for v5.4.0 --- .VERSION | 2 +- .clang-format | 1 - .mailmap | 7 ++++- CHANGELOG.md | 17 ++++++++++++ GNUmakefile.in | 2 +- PackageInfo.g | 54 ++++++++++++++++++++++----------------- VERSIONS | 1 + etc/cpplint.sh | 2 +- release.toml | 4 ++- src/CPPLINT.cfg | 2 +- src/bipart.cpp | 2 +- src/froidure-pin-base.cpp | 2 ++ 12 files changed, 65 insertions(+), 31 deletions(-) diff --git a/.VERSION b/.VERSION index 025c1ae7c..8a30e8f94 100644 --- a/.VERSION +++ b/.VERSION @@ -1 +1 @@ -5.3.7 +5.4.0 diff --git a/.clang-format b/.clang-format index d3ed8111b..c45482284 100644 --- a/.clang-format +++ b/.clang-format @@ -45,7 +45,6 @@ ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true DerivePointerAlignment: false -PointerAlignment: PAS_Left DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true diff --git a/.mailmap b/.mailmap index cac24492c..74afadfc1 100644 --- a/.mailmap +++ b/.mailmap @@ -1,3 +1,4 @@ +Marina Anagnostopoulou-Merkouri Marina Anagnostopoulou-Merkouri Stuart Burrell Stuart Burrell stuartburrell Reinis Cirpons Reinis Cirpons <43414125+reiniscirpons@users.noreply.github.com> @@ -8,8 +9,10 @@ Joseph Edwards Joe Edwards <80713360+Joseph-Edwards@user Joseph Edwards Joseph Edwards Luke Elliott le27 Fernando Flores Brito Fernando Flores Brito +Tillman Froehlich <47321884+awesometillman@users.noreply.github.com> Nick Ham -Robert Hancock Robert Hancock +Robert Hancock Robert Hancock +Robert Hancock Robert Hancock Max Horn Max Horn Chris Jefferson Chris Jefferson Julius Jonusas Julius @@ -19,6 +22,7 @@ Olexandr Konovalov Alexander Konovalov Alexander Konovalov Olexandr Konovalov Olexandr Konovalov <5751387+olexandr-konovalov@users.noreply.github.com> Artemis Konstantinidi artemiskonst <97620468+artemiskonst@users.noreply.github.com> +Hyeokjun Kwon Hyeokjun Kwon James Mitchell James Mitchell James Mitchell @@ -39,6 +43,7 @@ Chris Wensley cdwensley Murray Whyte <42549861+MTWhyte@users.noreply.github.com> Wilf Wilson Wilf Wilson Wilf Wilson wilfwilson +Tianrun Yang Tianrun Yang <117233646+Tianrun-Y@users.noreply.github.com> Michael Young Michael Young Michael Young mct25 diff --git a/CHANGELOG.md b/CHANGELOG.md index 07763b937..3d20d786f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/GNUmakefile.in b/GNUmakefile.in index aa197f383..7940cee7a 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -101,7 +101,7 @@ lint: etc/cpplint.sh format: - clang-format -i src/*.[hc] + clang-format -i src/*.*pp .PHONY: lint format diff --git a/PackageInfo.g b/PackageInfo.g index 1365f7bc5..d2d7f1b3a 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -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", @@ -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", @@ -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", @@ -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( @@ -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", @@ -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", @@ -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", @@ -295,8 +298,7 @@ Persons := [ LastName := "Spiers", FirstNames := "Ben", IsAuthor := true, - IsMaintainer := false, - Email := "bspiers972@outlook.com"), + IsMaintainer := false), rec( LastName := "Thiéry", @@ -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", diff --git a/VERSIONS b/VERSIONS index f45f3c7f5..fdbaac63d 100644 --- a/VERSIONS +++ b/VERSIONS @@ -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 diff --git a/etc/cpplint.sh b/etc/cpplint.sh index 84a75ad9a..d3a0cd89a 100755 --- a/etc/cpplint.sh +++ b/etc/cpplint.sh @@ -1,4 +1,4 @@ #!/bin/bash set -e -cpplint src/*.hpp src/*.h src/*.cpp +cpplint src/*.*pp diff --git a/release.toml b/release.toml index c265785c2..9fe0ae3f0 100644 --- a/release.toml +++ b/release.toml @@ -1,4 +1,6 @@ [authors] -expired_emails = ["cr66@st-andrews.ac.uk"] +expired_emails = ["cr66@st-andrews.ac.uk", "ak316@st-andrews.ac.uk", + "bspiers972@outlook.com", "chinmaya1011@gmail.com", + "hk78@st-andrews.ac.uk", "ty39@st-andrews.ac.uk"] author_files = ["PackageInfo.g"] ignore = ["convert-repo", "dependabot"] diff --git a/src/CPPLINT.cfg b/src/CPPLINT.cfg index 4d14976a7..33b73bd81 100644 --- a/src/CPPLINT.cfg +++ b/src/CPPLINT.cfg @@ -1,5 +1,5 @@ set noparent -filter=-build/c++11,-build/c++14,-build/include_subdir,-runtime/indentation_namespace,-runtime/references,-readability/todo +filter=-build/c++11,-build/c++14,-build/include_subdir,-runtime/indentation_namespace,-runtime/references,-readability/todo,-whitespace/indent_namespace linelength=80 root=../.. exclude_files=(semigroups-config.hpp|pkgconfig.h) diff --git a/src/bipart.cpp b/src/bipart.cpp index dbbd57b21..c9664fddb 100644 --- a/src/bipart.cpp +++ b/src/bipart.cpp @@ -1210,7 +1210,7 @@ Obj BLOCKS_INV_RIGHT(Obj self, Obj blocks_gap, Obj x_gap) { continue; } } - if (junk == (uint32_t) -1) { + if (junk == static_cast(-1)) { junk = next; next++; } diff --git a/src/froidure-pin-base.cpp b/src/froidure-pin-base.cpp index ec34d7d37..1e01da412 100644 --- a/src/froidure-pin-base.cpp +++ b/src/froidure-pin-base.cpp @@ -16,6 +16,8 @@ // along with this program. If not, see . // +#include // for std::shared_ptr + // Semigroups GAP package headers #include "to_cpp.hpp" // for to_cpp #include "to_gap.hpp" // for to_gap From 317dd110ca0b665a644238f81c142d985810d970 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 2 Nov 2024 20:04:21 +0100 Subject: [PATCH 19/19] Generalize IsSelfDualSemigroup declaration --- gap/attributes/properties.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gap/attributes/properties.gd b/gap/attributes/properties.gd index af321c8d6..37806612f 100644 --- a/gap/attributes/properties.gd +++ b/gap/attributes/properties.gd @@ -44,7 +44,7 @@ DeclareOperation("IsNormalInverseSubsemigroup", [IsInverseSemigroup, IsInverseSemigroup]); if not IsBoundGlobal("IsSelfDualSemigroup") then - DeclareProperty("IsSelfDualSemigroup", IsSemigroup and CanUseFroidurePin); + DeclareProperty("IsSelfDualSemigroup", IsSemigroup); fi; DeclareSynonymAttr("IsRectangularGroup",