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

Reduce impact of immediate methods: change some to implications, remove others, use custom SetSize method (rebased #2387) #2522

Merged
merged 3 commits into from
Jun 7, 2018

Conversation

fingolfin
Copy link
Member

This is a rebased version of #2387, which resolves a conflict, fixes some typos in the commit message, and adds a few more related changes of mine in two separate commits.

Assuming the tests pass, I plan to merge this tomorrow (since I am in St Andrews, I might talk some people here into looking at it first, too ;-).

@hulpke sorry for the delays :/

Closes #2387

hulpke and others added 3 commits June 6, 2018 21:27
This commit changes routines that create groups, certain Submagmas and vector
spaces so that flags that set basic properties (being trivial, being empty,
being cyclic) are set at the same time as the object was created.

This functionality used to be provided through immediate methods, however
this meant that the type of a just-created object was changed immediately
multiple times (with some changes precipitating other changes), causing a
notable performance hit.

Notably, the following changes have been done:

1) In a number of methods used to create groups (or submagmas, when called
from `Subgroup` or cosets) from generating sets, a number of cheaply deduced
properties (such as being cyclic) are set while creating the object. Thus the
immediate methods do not apply for these objects any longer.

2) Type caching in these methods is not worth the effort and has been
removed.

3) A new setter method for `Size` deals similarly with deductions done before
by immediate methods for a known size. Caveat: The manual specifies
(ill-advised one might say) that setting a different size if a size already
is given will be ignored. This is tested in manual examples and test files.
The new setter method therefore cannot be used to check for this property as
an error -- it will do so only if assertion level is set >=3.

4a) Immediate methods that have been made obsolete by the changes in 1) and
3) have been changed to ordinary methods.

4b) A number of immediate methods (e.g. a trivial group is solvable) have
been replaced by `TrueMethods` that have the same effect but are chapter to
run.

4c) Also a number of immediate methods that need to run often, but apply only
rarely (i.e. setting `IsFinite` to false if a size is set to `infinity`) have
been removed.

5) These changes have minor impact on test files and manual tests: A few
objects will have slightly different knowledge about their properties  and
thus print differently; respectively test code exists that checks explicitly
for such properties having been set by immediate methods. These tests and
examples have been changed. A few, very unstable tests (e.g. checking
explicitly for the values of random elements) have been commented out.

6) Some tests explicitly relied on immediate methods enabling derived series
calculations in special cases of finitely presented groups. These tests never
would have worked if immediate methods were turned off, the respective
finitely presented groups method has been changed accordingly to test
explicitly for the particular situation, thus enabling the same examples to
work.
@fingolfin fingolfin added the kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements label Jun 6, 2018
@fingolfin fingolfin changed the title Mh/immediates custom set size Reduce impact of immediate methods: change some to implications, remove others, use custom SetSize method Jun 6, 2018
@fingolfin fingolfin changed the title Reduce impact of immediate methods: change some to implications, remove others, use custom SetSize method Reduce impact of immediate methods: change some to implications, remove others, use custom SetSize method (rebased #2387) Jun 6, 2018
@codecov
Copy link

codecov bot commented Jun 6, 2018

Codecov Report

Merging #2522 into master will decrease coverage by <.01%.
The diff coverage is 94.11%.

@@            Coverage Diff             @@
##           master    #2522      +/-   ##
==========================================
- Coverage   74.34%   74.33%   -0.01%     
==========================================
  Files         481      481              
  Lines      243407   243428      +21     
==========================================
+ Hits       180955   180964       +9     
- Misses      62452    62464      +12
Impacted Files Coverage Δ
lib/ctbl.gd 70.83% <ø> (ø) ⬆️
lib/object.gd 50% <ø> (ø) ⬆️
lib/coll.gd 91.41% <ø> (ø) ⬆️
lib/grppc.gi 72.11% <100%> (+0.42%) ⬆️
lib/csetgrp.gi 59.16% <100%> (-0.16%) ⬇️
lib/grppcext.gi 50.47% <100%> (+0.1%) ⬆️
lib/grpfp.gi 65.1% <100%> (+0.12%) ⬆️
lib/modulrow.gi 91.35% <100%> (+0.19%) ⬆️
lib/grpmat.gi 68.15% <100%> (+0.24%) ⬆️
lib/grppcaut.gi 44.32% <50%> (+0.04%) ⬆️
... and 35 more

Copy link
Contributor

@hulpke hulpke left a comment

Choose a reason for hiding this comment

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

Fine with me. (Did not act on comments for my own PR as I was traveling.)

@fingolfin fingolfin merged commit 51d898c into gap-system:master Jun 7, 2018
@fingolfin fingolfin deleted the mh/immediates-custom-SetSize branch June 7, 2018 10:13
@olexandr-konovalov olexandr-konovalov added the gapdays2018-spring Issues and PRs that arose at http://www.gapdays.de/gap-jupyter-days2018 label Jun 8, 2018
@fingolfin fingolfin added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Sep 28, 2018
ThomasBreuer added a commit to ThomasBreuer/gap that referenced this pull request Dec 5, 2018
change the default methods for `GroupByGenerators`
and `GroupWithGenerators` such that the problem gets fixed
that had been introduced with pull request gap-system#2522
and discussed in issue gap-system#2703
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gapdays2018-spring Issues and PRs that arose at http://www.gapdays.de/gap-jupyter-days2018 kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: added PRs introducing changes that have since been mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants