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

avoid an attribute value after leaving a break loop #5731

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ThomasBreuer
Copy link
Contributor

When one creates a f.p. group and triggers an element comparison then it may happen that GAP does not return.
Hit CTRL-C, then GAP enters a break loop,
and when one leaves it with quit then it is currently too late for triggering the computation of an IsomorphismPermGroup or so that will control the behaviour of the group.

Here is an example that shows the situation in GAP 4.12. The master branch version is already too clever for this particular group, currently I have no test example that demonstrate the changes there.

f:= FreeGroup(3);;
AssignGeneratorVariables( f );;
rels:= [f3^6, f2^3, (f1^-1*f2^-1*f1*f2^-1)^2,
f2*f1^-1*f2^-1*f1^2*f2*f1^3*f2^-1*f1^-2*f2*f1^-1,
f1*(f1^2*f2^-1)^2*f1^-2*f2^-1*f1*f2*f1^-3*f2^-1,
f2*(f1^-1*f2*f1^-1)^2*f2*f1^2*f2^-1*f1^-4*f2^-1*f1^2,
f1*f2*f1^-1*f2^-1*(f1^-1*f2)^2*f1^-1*(f1^-1*f2^-1)^2*f1^4*f2*f1^2,
(f2*f1*f2^-1*f1^-2*f2^-1*f1)^3,
f1^4*f2*(f1^-1*f2^-1)^2*(f1^-1*f2)^2*f1^-2*f2*f1*f2^-1*f1^-1*f2*f1^-3*f2^-1*f1,
f2*f1*f2*f1^-2*f2^-1*f1*f2*f1^-1*f2^-1*f1^3*f2*f1^-2*f2*f1^-1*f2^-1*f1^2*f2^-1*(f1*f2)^2*f1^-1*(f2^-1*f1)^2,
f3*f1*f3^-1*f1^-1,
f3*f2*f3^-1*f2^-1];;
Q:= f / rels;;
Order(Q);
Order(Q.3);  # hangs in GAP 4.12, hit CTRL-C, enter quit;
IsomorphismPermGroup(Q);;   # the value will not be used automatically later on
Order(Q.3);  # hangs again

Does it make sense at all to try to avoid this kind of "object corruption" after leaving a break loop?

When one creates a f.p. group and triggers an element comparison
then it may happen that GAP does not return.
Hit CTRL-C, then GAP enters a break loop,
and when one leaves it with `quit` then it is currently too late
for triggering the computation of an `IsomorphismPermGroup` or so
that will control the behaviour of the group.

Here is an example that shows the situation in GAP 4.12.
The master branch version is already too clever for this particular group,
currently I have no test example that demonstrate the changes there.

```
f:= FreeGroup(3);;
AssignGeneratorVariables( f );;
rels:= [f3^6, f2^3, (f1^-1*f2^-1*f1*f2^-1)^2,
f2*f1^-1*f2^-1*f1^2*f2*f1^3*f2^-1*f1^-2*f2*f1^-1,
f1*(f1^2*f2^-1)^2*f1^-2*f2^-1*f1*f2*f1^-3*f2^-1,
f2*(f1^-1*f2*f1^-1)^2*f2*f1^2*f2^-1*f1^-4*f2^-1*f1^2,
f1*f2*f1^-1*f2^-1*(f1^-1*f2)^2*f1^-1*(f1^-1*f2^-1)^2*f1^4*f2*f1^2,
(f2*f1*f2^-1*f1^-2*f2^-1*f1)^3,
f1^4*f2*(f1^-1*f2^-1)^2*(f1^-1*f2)^2*f1^-2*f2*f1*f2^-1*f1^-1*f2*f1^-3*f2^-1*f1,
f2*f1*f2*f1^-2*f2^-1*f1*f2*f1^-1*f2^-1*f1^3*f2*f1^-2*f2*f1^-1*f2^-1*f1^2*f2^-1*(f1*f2)^2*f1^-1*(f2^-1*f1)^2,
f3*f1*f3^-1*f1^-1,
f3*f2*f3^-1*f2^-1];;
Q:= f / rels;;
Order(Q);
Order(Q.3);  # hangs in GAP 4.12, hit CTRL-C, enter quit;
IsomorphismPermGroup(Q);;   # the value will not be used automatically later on
Order(Q.3);  # hangs again
```

Does it make sense at all to try to avoid this kind of "object corruption"
after leaving a break loop?
@ThomasBreuer ThomasBreuer added release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes kind: discussion discussions, questions, requests for comments, and so on labels May 28, 2024
@ChrisJefferson
Copy link
Contributor

I think it makes sense to avoid corruption, but I think such corruption is inevitable with how GAP works -- we don't have a way of making multiple changes at once. Something like this often happens during change of base in permutation groups, where the stabilizer chain is broken.

In the past, there used to be a method to let people set a time-out in code, then trigger the same behaviour as a break loop, which we had to remove mainly because this type of thing happened far too often.

In a modern world complete-rewrite of GAP one could plan from the start to support atomic changes/additions to objects, but I don't think that can be reasonable added on at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: discussion discussions, questions, requests for comments, and so on release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants