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

Bug in acting semigroups ("<func> must return a value") #444

Closed
flsmith opened this issue Jan 18, 2018 · 2 comments
Closed

Bug in acting semigroups ("<func> must return a value") #444

flsmith opened this issue Jan 18, 2018 · 2 comments
Labels
bug Label for issues or PR which report or fix bugs

Comments

@flsmith
Copy link
Collaborator

flsmith commented Jan 18, 2018

@wilfwilson wrote in Slack

"I get the following error when stretching the acting code to its limits:

gap> PartialOrderOfDClasses(MotzkinMonoid(13));
Error, Function Calls: <func> must return a value in
 AddSet( out[i], lookup[Position( o, lambdafunc( y * x ) )] - 1
); at /Users/Wilf/GAP/pkg/semigroups/gap/greens/gracreg.gi:305 called from
<function "unknown">( <arguments> )
called from read-eval loop at *stdin*:23
you can supply one by 'return <value>;'

If it doesn’t work with you with MotzkinMonoid(13), maybe it would with 14 or higher. I’ve encountered simliar problems with JonesMonoid(21) and AnnularJonesMonoid(22)"

I can reproduce this error reliably.

(Possible red herring) I also suspect that the same bug is causing an issue I'm seeing in my dual semigroups code, which boils down to the following example. The error triggers within about 20s on my computer.

gap> S := SingularPartitionMonoid(5);;
gap> while true do
> List(S, x -> x in S);;
> od;
Error, Function Calls: <func> must return a value in
  xx := LambdaFunc( I )( x )
 ; at /home/finn/gap/pkg/semigroups/gap/ideals/idealact.gi:778 called from 
x in S at *stdin*:3 called from
func( elm ) at /home/finn/gap/lib/coll.gi:796 called from
CallFuncList( ListOp, arg ) at /home/finn/gap/lib/coll.gi:758 called from
List( S, function ( x )
      return x in S;
  end ); at *stdin*:3 called from
<function "unknown">( <arguments> )
 called from read-eval loop at *stdin*:4
you can supply one by 'return <value>;'

@markuspf suggested that this was likely a garbage collection related bug. The following code tends not to error (at least within any reasonable time), but I have seen the same error as before occur with this code too.

gap> S := SingularPartitionMonoid(5);;
gap> while true do
> List(S, x -> x in S);;
> GASMAN("collect");
> od;
@ssiccha
Copy link
Contributor

ssiccha commented Jan 27, 2018

I get a similar error when running the 'extreme' test directory.

@james-d-mitchell
Copy link
Collaborator

Fixed by #466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Label for issues or PR which report or fix bugs
Projects
None yet
Development

No branches or pull requests

3 participants