-
Notifications
You must be signed in to change notification settings - Fork 163
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
New tests for group constructors and some fixes #1053
Conversation
fingolfin
commented
Jan 7, 2017
•
edited
Loading
edited
- add a bunch of tests for group constructors in the grp directory
- add tests for for various matrix groups that verify the given invariant forms
- fix GO(1,4,5) (triggers an error on master)
- add invariant forms for Sp(2*n, Integers mod 2^k)
- remove cache limit from perfect groups library, to increase speed
- remove some invalid (and unusable) constructor variants
- tweak error messages in some group constructors
Current coverage is 53.97% (diff: 100%)
|
These all look good and uncontroversial. Will merge unless someone says something in the next couple of days. It is annoying it looks like coverage got worse, as tst files aren't marked as covered I think. |
Ahhhh, is that why? hmmm, so how are the total lines reported to / computed by codecov? I would havethought it only counts source files in lib, src, ... as shown on their website... |
I think the tes files are not the reason for this change. Rather, what really happened is that codecov ignores files which have neither hits nor misses. With this PR, it soundly "learned" about some additional source files (several |
Also updated some comments explaining why certain tests are excluded from testinstall.
Something weird is going on: I added a brutal test which invokes @ChrisJefferson any idea what might be going wrong here? |
These error message (and also those for the classical groups) seem to vary quite a bit. We may want to unify them at some point.
For some strange reasons, many group constructor wrapper allow the user to pass one more argument than documented. I could not find any methods supporting these extra arguments. Looking at the old repository, these extra calls already appear in the first GAP4 version of this code, added by Frank Celler 1997-01-15. So I think it's either a copy&paste mistake, or a remnant of GAP3.
Good question -- not sure. If I manually run |
Nope, it is my fault, something weird is going on (your tests lead to weirdly corrupted profiling output. I think it's because the files keep getting re-read. Investigating). |
Turns out profiling breaks with re-reading of files! Will looking into fixing that. Independently, the Perfect Groups library only keeps a cache of 50 groups (if I'm reading it right), perf.grp, line 31. If I push that to 1000, then |
Nice catch about that cache. In fact, there are only 331 entries, so setting this to 1000 just caches everything. I just checked: a fully loaded |
The whole data is only about 4.5 MB in RAM. The implemented caching logic was not very clever either (e.g. not using a "last recently used" approach, but rather always throwing away the first 25 loaded PERFGRP entries).
Coverage looks much better now -- no idea why one tiny bit of perf1.grp isn't covered... could you have a look and see if you think it's a profiling problem, or a GAP problem? |
The unused code in |
Actually, there are a bunch of these entries with an "otherpres." comment next to them. The indices of these entries are always higher than the number of perfect groups of that order, so presumably we are looking at alternative presentations for some groups (but which?). So the real weird part is that some of them are used after all... indirectly. E.g. 1080.2 is used by I am not sure why 1920.8, 1344.3 and 1344.4 are there but not used. I could not yet identify their source in Holt/Plesken (but I only skimmed and didn't try hard, so it might be in there). Anyway, it seems harmless. |
I think this is good now. Overall coverage is up by 3.55% and the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, with two small comments.
@@ -403,7 +403,7 @@ BindGlobal( "Oplus45", function() | |||
|
|||
# construct the group without calling 'Group' | |||
g := [ phi*tau2, tau*eichler*delta ]; | |||
g:=List(g,i->ImmutableMatrix(f,i),true); | |||
g:=List(g,i->ImmutableMatrix(f,i)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this code ever work, out of interest? What's that true
supposed to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it worked until 814a0f6 broke it by making List
validate its arguments more agressively. My guess is that the true
in there was an accident.
g := Group(slmats); | ||
mat := Concatenation(id{[nh+1..n]},-id{[1..nh]}); | ||
SetInvariantBilinearForm(g,rec(matrix:=mat)); | ||
return g; | ||
end); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to trust this is right.. I assume these is a test for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes -- indeed, writing the tests for Sp(2*n, Integers mod p^k)
lead me to discover that the invariant form was missing for p=2
, and hence I added this to make the tests pass. so this was TDD (test driven development) :-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now approved
So, merge this? Rebase it? Should I do it myself? |