Skip to content

Conversation

@fingolfin
Copy link
Member

Fix a bug reported by Laurent Bartholdi.

This is a rebased, squashed and slightly improved version of PR #2079

@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Jan 12, 2018
@fingolfin fingolfin force-pushed the mh/JenningsLieAlgebra branch from 79c8d90 to 492d0cd Compare January 12, 2018 19:37
@codecov
Copy link

codecov bot commented Jan 12, 2018

Codecov Report

Merging #2085 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2085      +/-   ##
==========================================
+ Coverage   69.31%   69.31%   +<.01%     
==========================================
  Files         491      491              
  Lines      258013   257960      -53     
==========================================
- Hits       178841   178814      -27     
+ Misses      79172    79146      -26
Impacted Files Coverage Δ
lib/alglie.gi 68.98% <100%> (+0.81%) ⬆️
hpcgap/lib/integer.gi 71.32% <0%> (-1.39%) ⬇️
lib/integer.gi 83.58% <0%> (-0.66%) ⬇️
src/system.c 63.34% <0%> (-0.49%) ⬇️
src/streams.c 55.2% <0%> (-0.26%) ⬇️
hpcgap/lib/hpc/stdtasks.g 38.61% <0%> (-0.26%) ⬇️
src/integer.c 90.51% <0%> (-0.2%) ⬇️
src/funcs.c 78.62% <0%> (-0.14%) ⬇️
src/intrprtr.c 76.92% <0%> (ø) ⬆️
src/permutat.c 79.89% <0%> (ø) ⬆️
... and 21 more

Copy link
Member

@olexandr-konovalov olexandr-konovalov left a comment

Choose a reason for hiding this comment

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

Shouldn't tests use START_TEST and STOP_TEST? My guess was that they should for testinstall/standard, but not for testbugfix. Maybe jennings.txt should go into the bugfix directory with appropriate name change (as it tests a fix, does not provide a comprehensive test coverage for some area of GAP functionality?)

Side remark: there are some other tests in testinstall which miss START_TEST and STOP_TEST.

@fingolfin
Copy link
Member Author

I don't know about any rules that say START_TEST/STOP_TEST must be there. Any particular reason we'd want it here?

I don't care where this new test file is put; I only made this PR to help get that fix in. If you want me to move it, I am fine with doing that, I just don't want to move it back again for the next reviewer. :-)

@olexandr-konovalov
Copy link
Member

olexandr-konovalov commented Jan 15, 2018

@fingolfin START_TEST does some things which in particular help to tests reproducibility:

gap/lib/profile.g

Lines 1027 to 1034 in 286b995

## <Ref Func="START_TEST"/> and <Ref Func="STOP_TEST"/> may be optionally
## used in files that are read via <Ref Func="Test"/>. If used,
## <Ref Func="START_TEST"/> reinitialize the caches and the global
## random number generator, in order to be independent of the reading
## order of several test files. Furthermore, the assertion level
## (see&nbsp;<Ref Func="Assert"/>) is set to <M>2</M> (if it was lower before) by
## <Ref Func="START_TEST"/> and set back to the previous value in the
## subsequent <Ref Func="STOP_TEST"/> call.

Keeping calls to START_TEST in test files and not e.g. in TestDirectory allows to test a single testfile with Test and still have a setting close (of course, to some extent) to the one which will be used when running the full test suite (barring memory settings, packages loaded etc).

(IIRC there was a Wiki page "How to add a test to GAP", but can't seem to be able to find it now).

If you want to keep it in testinstall, I suggest to name it liealgebras.tst or so, as the obvious place where to put more tests for Lie algebras (and maybe @willemdegraaf would be interested to add some while starting to work with git?). Otherwise, jennings.tst IMHO is too narrow for a test in testinstall (but would be fine for a test in testbugfix).

@fingolfin fingolfin force-pushed the mh/JenningsLieAlgebra branch from 492d0cd to 8179a7e Compare January 15, 2018 22:06
@fingolfin
Copy link
Member Author

Alex, I know all that about START_TEST but fail to see the relevance of any of that in this particular case.
I also don't really "want" to keep that test fil anywhere. I just want to be done with this, and move on to things I care about.

I have now moved the .tst file to testbugfix.

@olexandr-konovalov
Copy link
Member

OK, then please just rename it to 2018-01-15-jennings.tst to follow the naming convention for the testbugfix directory and that will be it.

Fix a bug reported by Laurent Bartholdi.
@fingolfin fingolfin force-pushed the mh/JenningsLieAlgebra branch from 8179a7e to b8df408 Compare January 15, 2018 22:42
@fingolfin
Copy link
Member Author

Done

Copy link
Member

@olexandr-konovalov olexandr-konovalov left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! waiting for macos travis build to pass.

@olexandr-konovalov olexandr-konovalov merged commit 0c4601c into gap-system:master Jan 16, 2018
@fingolfin fingolfin deleted the mh/JenningsLieAlgebra branch January 18, 2018 08:12
@olexandr-konovalov olexandr-konovalov added this to the GAP 4.10.0 milestone Jan 21, 2018
@olexandr-konovalov olexandr-konovalov added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Jan 29, 2018
@olexandr-konovalov
Copy link
Member

olexandr-konovalov commented Jan 29, 2018

Added to release notes for GAP 4.10 at https://github.com/gap-system/gap/wiki/GAP-4.10-release-notes. I've checked what happens in GAP 4.8.10:

gap> g := Group((1,10)(2,9)(3,11)(4,12)(5,15)(6,16)(7,13)(8,14)(17,21)(18,22)*
> (19,24)(20,23)(25,27)(26,28)(29,30)(33,51)(34,52)(35,49)(36,50)(37,54)(38,53)*
> (39,55)(40,56)(41,61)(42,62)(43,64)(44,63)(45,57)(46,58)(47,60)(48,59), 
> (1,19)(2,20)(3,17)(4,18)(5,22)(6,21)(7,23)(8,24)(9,29)(10,30)(11,32)(12,31)*
> (13,25)(14,26)(15,28)(16,27)(33,42)(34,41)(35,43)(36,44)(37,47)(38,48)(39,45)*
> (40,46)(49,53)(50,54)(51,56)(52,55)(57,59)(58,60)(61,62), 
> (1,37)(2,38)(3,40)(4,39)(5,33)(6,34)(7,36)(8,35)(9,43)(10,44)(11,41)(12,42)*
> (13,46)(14,45)(15,47)(16,48)(17,58)(18,57)(19,59)(20,60)(21,63)(22,64)(23,61)*
> (24,62)(25,50)(26,49)(27,51)(28,52)(29,55)(30,56)(31,53)(32,54));
<permutation group with 3 generators>
gap> L:= JenningsLieAlgebra(g);
<Lie algebra of dimension 13 over GF(2)>
gap> List(Basis(L),PthPowerImage);
[ 0*v.1, v.3, 0*v.1, v.1, v.2, v.3, 0*v.1, v.10, v.11, v.12, 0*v.1, v.12, 
  0*v.1 ]
gap> LieLowerCentralSeries(L);
[ <Lie algebra of dimension 13 over GF(2)>, 
  <Lie algebra of dimension 3 over GF(2)> ]

so this is classified as a bug that can lead to incorrect results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants