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

Modernize eclib library interface #19818

Closed
jdemeyer opened this issue Jan 1, 2016 · 24 comments
Closed

Modernize eclib library interface #19818

jdemeyer opened this issue Jan 1, 2016 · 24 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Jan 1, 2016

As part of cleaning up library interfaces, clean up eclib:

  1. Move all declarations for eclib library functions to src/sage/libs/eclib/__init__.pxd.

  2. Use the C++ capabilities of Cython, in particular use cdef cppclass.

  3. Move (with deprecation) the library interface from src/sage/libs/mwrank and src/sage/libs/cremona to src/sage/libs/eclib.

There are no functional changes at all.

Upstream bug found: JohnCremona/eclib#10

CC: @JohnCremona @jpflori

Component: cython

Author: Jeroen Demeyer

Branch/Commit: d3f8404

Reviewer: Jean-Pierre Flori

Issue created by migration from https://trac.sagemath.org/ticket/19818

@jdemeyer jdemeyer added this to the sage-7.0 milestone Jan 1, 2016
@jdemeyer

This comment has been minimized.

@JohnCremona
Copy link
Member

comment:2

I have commented at the upstream Issue, but I would not call this a bug. The build system causes all the code to be compiled with a certain macro defined (namely NTL_ALL), and the code will not build without that flag being defined, but the build system does not allow any way for that macro not to be defined anyway!

@jdemeyer
Copy link
Author

jdemeyer commented Jan 1, 2016

comment:3

Replying to @JohnCremona:

I have commented at the upstream Issue, but I would not call this a bug.

It's at least a documentation bug (it's not true that NTL_ALL is the default).

The build system...

Which "build system" are you talking about and why do you claim that "the build system does not allow any way for that macro not to be defined"

@jdemeyer
Copy link
Author

jdemeyer commented Jan 1, 2016

comment:4

I am working on cleaning up the Cython interface to eclib and got this doctest failure, any quick idea?

sage -t src/sage/libs/mwrank/interface.py
**********************************************************************
File "src/sage/libs/mwrank/interface.py", line 283, in sage.libs.mwrank.interface.mwrank_EllipticCurve.isogeny_class
Failed example:
    E.isogeny_class()
Expected:
    ([[0, -1, 1, 0, 0], [0, -1, 1, -10, -20], [0, -1, 1, -7820, -263580]], [[0, 5, 0], [5, 0, 5], [0, 5, 0]])
Got:
    ([[0, -1, 1, 0, 0], [0, -1, 1, -10, -20], [0, -1, 1, -7820, -263580]],
     [[0, 0, 5], [0, 0, 0], [5, 0, 0]])
**********************************************************************

@jdemeyer
Copy link
Author

jdemeyer commented Jan 1, 2016

comment:5

It seems that simply changing the order of #include "eclib/moddata.h" causes this doctest failure.

@jdemeyer

This comment has been minimized.

@JohnCremona
Copy link
Member

comment:7

Replying to @jdemeyer:

Replying to @JohnCremona:

I have commented at the upstream Issue, but I would not call this a bug.

It's at least a documentation bug (it's not true that NTL_ALL is the default).

The build system...

Which "build system" are you talking about and why do you claim that "the build system

I meant the auto tools stuff.

does not allow any way for that macro not to be defined"

There is no option to Configure which affects it.

@JohnCremona
Copy link
Member

comment:8

The second output is wrong (the one where the matrix has a zero row ).

moddata.h has nothing at all to do with elliptic curve isogenies!

@jdemeyer
Copy link
Author

jdemeyer commented Jan 1, 2016

comment:9

Replying to @JohnCremona:

moddata.h has nothing at all to do with elliptic curve isogenies!

Still, simply including that file earlier breaks that doctest...

@jdemeyer
Copy link
Author

jdemeyer commented Jan 1, 2016

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

jdemeyer commented Jan 1, 2016

Commit: 3c83e65

@jdemeyer
Copy link
Author

jdemeyer commented Jan 1, 2016

New commits:

3c83e65Modernize eclib interface

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

jdemeyer commented Jan 3, 2016

comment:13

@jpflori: could you review this please? It is very similar in spirit to the NTL cleanup we did recently.

@JohnCremona
Copy link
Member

comment:14

I agree that changing the name from sage.libs.mwrank is a good idea but why not change it to sage.libs.eclib ?

@jdemeyer
Copy link
Author

jdemeyer commented Jan 3, 2016

comment:15

Replying to @JohnCremona:

I agree that changing the name from sage.libs.mwrank is a good idea but why not change it to sage.libs.eclib ?

First of all, tt's clear that all eclib interface code should be in one place, not split in sage.libs.mwrank and sage.libs.cremona.

Do you prefer to change both to sage.libs.eclib?

@JohnCremona
Copy link
Member

comment:16

Replying to @jdemeyer:

Replying to @JohnCremona:

I agree that changing the name from sage.libs.mwrank is a good idea but why not change it to sage.libs.eclib ?

First of all, tt's clear that all eclib interface code should be in one place, not split in sage.libs.mwrank and sage.libs.cremona.

Do you prefer to change both to sage.libs.eclib?

Yes I prefer that. eclib might outlive me!

@jdemeyer

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 3, 2016

Changed commit from 3c83e65 to d3f8404

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 3, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

d3f8404Rename cremona -> eclib

@jpflori
Copy link

jpflori commented Jan 5, 2016

Reviewer: Jean-Pierre Flori

@jpflori
Copy link

jpflori commented Jan 5, 2016

comment:20

Looks ok to me.

@vbraun
Copy link
Member

vbraun commented Jan 6, 2016

Changed branch from u/jdemeyer/modernize_eclib_library_interface to d3f8404

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

No branches or pull requests

4 participants