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

enable sub-solutions #95

Merged
merged 5 commits into from
Aug 10, 2017
Merged

enable sub-solutions #95

merged 5 commits into from
Aug 10, 2017

Conversation

malb
Copy link
Collaborator

@malb malb commented Aug 4, 2017

  • add sub-solution support
  • make API consistent between sub-solutions and full solutions/fplll

@malb malb requested a review from lducas August 4, 2017 22:51
enumerate swapped norm and vector compared to fplll and subsolutions
Copy link
Member

@lducas lducas left a comment

Choose a reason for hiding this comment

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

`` Code that isn't tested is broken... ''
Maybe I missed it, but I can't find any dedicated test for sub-solutions.

Copy link
Member

@lducas lducas left a comment

Choose a reason for hiding this comment

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

I've tested it in the wild, seems to work except from a few aberrant solution length once in a while (looks like unallocated memory). I have tough time making it reproducible though.

The interface is convenient.

>>> pruning = Pruning.run(M.get_r(0, 0), 2**40, M.r()[:30], 0.2)
>>> enum = Enumeration(M, strategy=EvaluatorStrategy.BEST_N_SOLUTIONS, sub_solutions=True)
>>> _ = enum.enumerate(0, 30, 0.999*M.get_r(0, 0), 0, pruning=pruning.coefficients)
>>> [int(a) for a,b in enum.sub_solutions[:5]]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tests are here, could check for more mathematical properties, though

Copy link
Member

Choose a reason for hiding this comment

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

Ta.

@malb
Copy link
Collaborator Author

malb commented Aug 6, 2017

We should wait with merging until the possible unallocated memory issue is resolved. set_random_seed doesn't allow to reproduce it?

@lducas
Copy link
Member

lducas commented Aug 6, 2017

Its actually not such a huge bug. It is just a rather awkward behaviour. When nothing is found two things can happen:
1/ (a, b) = (0.0, (0.0, ... 0.0))
2/ (a, b) = (random, ())

So I guess initialized memory is involved in case 2, yet nothing too deep I'd guess. Not sure if this should be fixed in fplll or fpylll.

@lducas
Copy link
Member

lducas commented Aug 6, 2017

For any practical purpose, the attached pickle files contains a triple
(B, radius, pruning)
where case 2/ happened (pruned enumeration on the whole basis B).
buugy_inst.pkl.zip

@malb malb merged commit e32d7eb into master Aug 10, 2017
@malb malb deleted the subsolutions branch May 17, 2018 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants