Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve viewing of empty semigroups #3052

Merged
merged 1 commit into from
Nov 26, 2018

Conversation

wilfwilson
Copy link
Member

Currently, unexpected errors can occur when viewing empty semigroups:

gap> S := FullTransformationMonoid(2);;
gap> Subsemigroup(S, []);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `DegreeOfTransformationCollection' on 1 \
arguments at /Users/Wilf/gap/lib/methsel2.g:250 called from
DegreeOfTransformationCollection( GeneratorsOfSemigroup( s )
 ) at /Users/Wilf/gap/lib/semitran.gi:97 called from
DegreeOfTransformationSemigroup( S ) at /Users/Wilf/gap/lib/semitran.gi:28 called from
SemigroupViewStringSuffix( S ) at /Users/Wilf/gap/lib/semigrp.gi:97 called from
ViewString( obj ) at /Users/Wilf/gap/lib/object.gi:420 called from
SHELL( GetBottomLVars(  ), false, false, 3, true, prompt, function (  )
      if IsBound( OnGAPPromptHook ) and IsFunction( OnGAPPromptHook ) then
          OnGAPPromptHook(  );
      else
          return;
      fi;
      return;
  end, "*stdin*", "*stdout*", true ); at /Users/Wilf/gap/lib/session.g:61 called from
...  at *stdin*:2
type 'quit;' to quit to outer loop
brk>

Empty semigroups are well-supported by neither the GAP library nor the Semigroups package. Making everything work with empty semigroups is not my immediate goal. However, since it's possible to create empty semigroups in GAP, I think it makes sense to increase their support, at least where it is easy to do so, like in this PR.

After this PR:

gap> S := FullTransformationMonoid(2);;
gap> Subsemigroup(S, []);
<empty transformation semigroup>

@wilfwilson wilfwilson added kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them topic: library labels Nov 24, 2018
@codecov
Copy link

codecov bot commented Nov 25, 2018

Codecov Report

Merging #3052 into master will increase coverage by 0.24%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3052      +/-   ##
==========================================
+ Coverage   82.75%   82.99%   +0.24%     
==========================================
  Files         682      684       +2     
  Lines      337565   343262    +5697     
==========================================
+ Hits       279346   284904    +5558     
- Misses      58219    58358     +139
Impacted Files Coverage Δ
lib/semigrp.gi 75.07% <100%> (+0.15%) ⬆️
lib/magma.gi 77.98% <100%> (+0.11%) ⬆️
src/vector.c 94.46% <0%> (-5.54%) ⬇️
src/hookintrprtr.c 67.34% <0%> (-4.88%) ⬇️
src/iostream.c 62.35% <0%> (-3.5%) ⬇️
src/lists.c 73.39% <0%> (-3.48%) ⬇️
src/vecffe.c 72.02% <0%> (-2.5%) ⬇️
src/records.c 80.9% <0%> (-2.34%) ⬇️
src/c_type1.c 83.96% <0%> (-2.29%) ⬇️
src/sysfiles.c 40.59% <0%> (-1.99%) ⬇️
... and 81 more

Previously, unexpected errors could occur when
viewing empty semigroups.
Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fingolfin fingolfin merged commit 23f47b6 into gap-system:master Nov 26, 2018
@wilfwilson wilfwilson deleted the empty-semigroup branch November 26, 2018 07:18
@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Mar 21, 2019
@PaulaHaehndel PaulaHaehndel added the release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes label Apr 15, 2019
@wilfwilson wilfwilson added release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Apr 24, 2019
@olexandr-konovalov olexandr-konovalov added this to the GAP 4.11.0 milestone Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them release notes: added PRs introducing changes that have since been mentioned in the release notes topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants