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

Make bliss return the size of the automorphism group #278

Merged
merged 3 commits into from
Jan 23, 2020

Conversation

ChrisJefferson
Copy link
Contributor

Bliss previously returned the size of the automorphism group
as a double, which is not useful for GAP. Instead of trying to
build the size of the group during search, store a list of numbers
which must be multiplied together and return that to GAP.

This PR isn't ready yet (various tests fail). The main problem is it's going to be annoying to make the tests work with, and without, an external bliss. I was wondering why that option is there, and who is using it?

Bliss previously returned the size of the automorphism group
as a double, which is not useful for GAP. Instead of trying to
build the size of the group during search, store a list of numbers
which must be multiplied together and return that to GAP.
@james-d-mitchell
Copy link
Member

Thanks @ChrisJefferson, I think the sage guys are using their own bliss instead of the one vendored by Digraphs. Agreed that it is annoying to have to tests working in two different cases. Is one possibility to submit a patch to

https://github.com/mkoeppe/bliss

which is I think where Sage gets its Bliss from. Maybe @nthiery or @embray can offer more details of the rationale behind this if necessary.

@james-d-mitchell
Copy link
Member

james-d-mitchell commented Jan 16, 2020

Ah sorry actually it looks like it was me that wanted to have a GAP conda package and that @isuruf wrote the code for external bliss in PR #225.

Copy link
Collaborator

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

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

Thanks a lot @ChrisJefferson.

I've just updated the tests to suppress printing of the the newly-known size. This gets it working, which although not ideal is fine, I think.

@wilfwilson
Copy link
Collaborator

Anyway, since the tests are passing, I'd be happy for this to be merged. Everyone else agree?

In which case I recommend a squash and merge, to get rid of the two commits that I added.

@isuruf
Copy link
Contributor

isuruf commented Jan 16, 2020

I'm not sure I understand the need for a list. Why not use the gmp class BigNum and convert that to GAP?

@ChrisJefferson
Copy link
Contributor Author

ChrisJefferson commented Jan 16, 2020 via email

@ChrisJefferson
Copy link
Contributor Author

I might just pull in @fingolfin, just to see if he thinks making gmp variables in bliss and then getting them turned in to GAP numbers is reasonable / easy.

@isuruf
Copy link
Contributor

isuruf commented Jan 16, 2020

I'm okay with you using a list here, but would like it if there's a way for distros to use GMP.

@isuruf
Copy link
Contributor

isuruf commented Jan 16, 2020

As for GMP, you only need to care about getting the headers correctly. You don't have to link because gap itself will be pulling in GMP before you in import semigroups in GAP.

@fingolfin
Copy link
Contributor

fingolfin commented Jan 17, 2020

I'm not fully informed about the context of this and what are possible options and what not; but let me point out that we added MakeObjInt in GAP 4.10 specifically to convert GMP mpz_t to GAP integers. This function does not require that the same GMP is used. If you need to support older GAP versions, it would be safe to copy the implementation of MakeObjInt and use if inside a suitable #if (As for GAP <= 4.9 of course you know the internal GAP format won't change; but in theory, it might in future GAP versions; hence us MakeObjInt there).

If using MakeObjInt is not possible and somebody tells me why, I am happy to think about other options.

@james-d-mitchell james-d-mitchell added the new-feature A label for new features. label Jan 17, 2020
@james-d-mitchell
Copy link
Member

I'm also happy with this.

@fingolfin
Copy link
Contributor

(Just to clarify, I am not objecting to this PR or taking any stance, just replying to @ChrisJefferson's question :-)

@ChrisJefferson
Copy link
Contributor Author

@fingolfin : Thanks, I didn't think you were, I was just worried about trying to use GMP "normally" and then trying to get that number into GAP.

Personally, I do think this is a bit of a horrible hack, but bliss is basically abandoned at this point. If anyone else wanted to neaten this up for general use, I'd be happy to help do that, but for my purposes this is "good enough".

@james-d-mitchell james-d-mitchell merged commit a0075cb into digraphs:master Jan 23, 2020
james-d-mitchell pushed a commit that referenced this pull request Jan 23, 2020
* Make bliss return the size of the automorphism group

Bliss previously returned the size of the automorphism group
as a double, which is not useful for GAP. Instead of trying to
build the size of the group during search, store a list of numbers
which must be multiplied together and return that to GAP.

* cpplint

* Fix tests

Co-authored-by: Wilf Wilson <wilf@wilf-wilson.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A label for new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants