Ticket #12555 (needs_work enhancement)

Opened 15 months ago

Last modified 3 weeks ago

Reimplement elements of Zp and Qp using templates

Reported by: roed Owned by: roed
Priority: major Milestone: sage-5.10
Component: padics Keywords:
Cc: sydahmad, justin, wstein, JStarx, jpflori Work issues:
Report Upstream: N/A Reviewers: William Stein, Soroosh Yazdani, Julian Rueth
Authors: David Roe, Julian Rueth Merged in:
Dependencies: #12625, #13299, #14287, #12575, #6223 Stopgaps:

Description (last modified by jdemeyer) (diff)

The goal of this ticket is to reimplement elements of Zp and Qp using the ideas from sage/rings/polynomial/polynomial_template.pxi. This should make p-adics in Sage both easier to maintain and easier to add new classes.

The final patch should not affect the external interface to Zp and Qp.


Apply

Attachments

12555.patch Download (105.7 KB) - added by roed 15 months ago.
Still some bugs, but it should be useable to compare timings
12555_2.patch Download (404.3 KB) - added by roed 15 months ago.
I've fixed all known bugs; currently doctesting
12555_printing.patch Download (5.6 KB) - added by roed 15 months ago.
12555_remove_base_coerce.patch Download (30.9 KB) - added by roed 15 months ago.
12555_conv.patch Download (14.4 KB) - added by roed 15 months ago.
12555_remove_base.patch Download (32.9 KB) - added by roed 15 months ago.
12555_linkage.patch Download (42.6 KB) - added by roed 15 months ago.
12555_template.patch Download (15.5 KB) - added by roed 15 months ago.
12555_FM.patch Download (76.8 KB) - added by roed 15 months ago.
12555_CR.patch Download (159.3 KB) - added by roed 15 months ago.
12555_CA.patch Download (88.6 KB) - added by roed 15 months ago.
trac_12555-referee.patch Download (63.3 KB) - added by was 15 months ago.
this is my REFEREE patch after reading through half the code. I stopped at padic_ZZ_pX_FM_element.pyx. This is the ultimate patch bomb. Very hard to referee…
trac_12555_review.patch Download (816 bytes) - added by saraedum 2 months ago.
review patch to match changes done in 5.9.beta0
trac_12555.patch Download (547.5 KB) - added by jdemeyer 5 weeks ago.
combined github patch
12555_rebase_6223.patch Download (2.3 KB) - added by jdemeyer 5 weeks ago.

Change History

comment:1 in reply to: ↑ description Changed 15 months ago by sydahmad

  • Cc sydahmad added

Replying to roed:

The goal of this ticket is to reimplement elements of Zp and Qp using the ideas from sage/rings/polynomial/polynomial_template.pxi. This should make p-adics in Sage both easier to maintain and easier to add new classes.

comment:2 Changed 15 months ago by roed

  • Cc justin added

comment:3 Changed 15 months ago by roed

  • Description modified (diff)

Now includes capped absolute and fixed modulus elements. There are a few problems remaining:

  • teichmuller_list is disabled since it had a bug and I didn't want to fix it at the time. I'll track this down later.
  • Some coercions aren't working since the element class has changed.

This version should be enough for Justin to compare the performance of the templated and non-templated versions. I'm now going to create another patch on top of this which removes the untemplated versions.

Changed 15 months ago by roed

Still some bugs, but it should be useable to compare timings

Changed 15 months ago by roed

I've fixed all known bugs; currently doctesting

Changed 15 months ago by roed

Changed 15 months ago by roed

Changed 15 months ago by roed

Changed 15 months ago by roed

Changed 15 months ago by roed

Changed 15 months ago by roed

Changed 15 months ago by roed

Changed 15 months ago by roed

Changed 15 months ago by roed

comment:4 Changed 15 months ago by roed

  • Cc wstein, JStarx added
  • Status changed from new to needs_review
  • Authors set to David Roe

comment:5 Changed 15 months ago by roed

  • Dependencies set to #12625, #12575

Changed 15 months ago by was

this is my REFEREE patch after reading through half the code. I stopped at padic_ZZ_pX_FM_element.pyx. This is the ultimate patch bomb. Very hard to referee...

comment:6 Changed 3 months ago by saraedum

  • Status changed from needs_review to needs_work
  • Reviewers set to William Stein, Soroosh Yazdani, Julian Rueth

A review of this patch is at https://github.com/saraedum/padic-review/commit. We agreed to work on the remaining issues there.

comment:7 Changed 3 months ago by roed

  • Dependencies changed from #12625, #12575 to #12625, #12575, #14106

comment:8 follow-up: ↓ 9 Changed 3 months ago by roed

  • Milestone changed from sage-5.8 to sage-5.7

I've made a pull request to https://github.com/saraedum/padic-review/commit, addressing the comments. Tests all pass for me.

We had discussed having a document that runs some overall tests. I haven't made that yet, but can this week. If someone has time to take a look at this this week, I'll be available to make changes....

comment:9 in reply to: ↑ 8 ; follow-up: ↓ 10 Changed 3 months ago by saraedum

Replying to roed:

I've made a pull request to https://github.com/saraedum/padic-review/commit, addressing the comments. Tests all pass for me.

Great.

We had discussed having a document that runs some overall tests. I haven't made that yet, but can this week. If someone has time to take a look at this this week, I'll be available to make changes....

You haven't started to work on this already, have you? I just started to work on these tests. I'll push to github as soon as I have something working.

comment:10 in reply to: ↑ 9 ; follow-up: ↓ 11 Changed 3 months ago by roed

We had discussed having a document that runs some overall tests. I haven't made that yet, but can this week. If someone has time to take a look at this this week, I'll be available to make changes....

You haven't started to work on this already, have you? I just started to work on these tests. I'll push to github as soon as I have something working.

No, I haven't started. I'll wait to see what you come up with.

Do we have a list of things that need to be done before this gets a positive review?

comment:11 in reply to: ↑ 10 ; follow-up: ↓ 12 Changed 3 months ago by saraedum

Replying to roed:

Do we have a list of things that need to be done before this gets a positive review?

Not yet. Should we use github issues for this?

comment:12 in reply to: ↑ 11 Changed 3 months ago by roed

Replying to saraedum:

Replying to roed:

Do we have a list of things that need to be done before this gets a positive review?

Not yet. Should we use github issues for this?

Sure, that sounds good.

comment:13 Changed 2 months ago by saraedum

  • Dependencies changed from #12625, #12575, #14106 to #12625, #12575, #14106, #14285

comment:14 Changed 2 months ago by saraedum

apply trac_12555.patch

comment:15 Changed 2 months ago by saraedum

  • Description modified (diff)

comment:16 Changed 2 months ago by saraedum

  • Dependencies changed from #12625, #12575, #14106, #14285 to #12625, #12575, #14106, #14284

comment:17 Changed 2 months ago by saraedum

  • Dependencies changed from #12625, #12575, #14106, #14284 to #12625, #12575, #14106, #14284, #14287

comment:18 Changed 2 months ago by roed

  • Dependencies changed from #12625, #12575, #14106, #14284, #14287 to #12625, #12575, #13299, #14284, #14287

comment:19 Changed 2 months ago by roed

  • Dependencies changed from #12625, #12575, #13299, #14284, #14287 to #12625, #12575, #13299, #14287

comment:20 Changed 2 months ago by saraedum

apply trac_12555.patch

comment:21 Changed 2 months ago by saraedum

  • Dependencies changed from #12625, #12575, #13299, #14287 to #12625, #13299, #14287, #12575

comment:22 Changed 2 months ago by saraedum

  • Status changed from needs_work to needs_review

comment:23 Changed 2 months ago by saraedum

apply trac_12555.patch

comment:24 Changed 2 months ago by saraedum

apply trac_12555.patch

comment:25 Changed 2 months ago by saraedum

  • Status changed from needs_review to positive_review
  • Authors changed from David Roe to David Roe, Julian Rueth

comment:26 Changed 2 months ago by saraedum

apply trac_12555.patch

Changed 2 months ago by saraedum

review patch to match changes done in 5.9.beta0

comment:27 Changed 2 months ago by jdemeyer

  • Milestone changed from sage-5.7 to sage-5.9

comment:28 Changed 2 months ago by roed

  • Description modified (diff)
  • Milestone changed from sage-5.9 to sage-5.7

comment:29 Changed 2 months ago by roed

  • Milestone changed from sage-5.7 to sage-5.9

comment:30 Changed 2 months ago by jdemeyer

  • Milestone changed from sage-5.9 to sage-pending

comment:31 Changed 7 weeks ago by jdemeyer

  • Milestone changed from sage-pending to sage-5.10

comment:32 Changed 5 weeks ago by jdemeyer

  • Status changed from positive_review to needs_work
  • Dependencies changed from #12625, #13299, #14287, #12575 to #12625, #13299, #14287, #12575, #6223

Please rebase to #6223.

Changed 5 weeks ago by jdemeyer

combined github patch

comment:33 Changed 5 weeks ago by jdemeyer

  • Status changed from needs_work to positive_review

comment:34 Changed 5 weeks ago by jdemeyer

  • Status changed from positive_review to needs_work

This still needs work rebasing to #6223. Also PyErr_Occured() should not be used anymore in favour of standard Python except handling.

Changed 5 weeks ago by jdemeyer

comment:35 Changed 5 weeks ago by jdemeyer

  • Status changed from needs_work to needs_review
  • Description modified (diff)

comment:36 Changed 5 weeks ago by jdemeyer

12555_rebase_6223.patch Download needs review.

comment:37 Changed 5 weeks ago by jpflori

  • Cc jpflori added

comment:38 Changed 5 weeks ago by roed

  • Status changed from needs_review to positive_review

Those changes look fine to me.

comment:39 Changed 5 weeks ago by jdemeyer

  • Status changed from positive_review to needs_work

Please fix this documentation problem (I won't):

[139 [690]] [130
! Missing $ inserted.
<inserted text> 
                $
l.10592 $i^{\mbox{prec_cap}
                           }$ if the element was defined by
? ]
! Emergency stop.
<inserted text> 
                $
l.10592 $i^{\mbox{prec_cap}
                           }$ if the element was defined by
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on padics.log.
 [17make[1]: *** [padics.pdf] Error 1
make[1]: Leaving directory `/mazur/release/merger/sage-5.10.beta1/devel/sage-main/doc/output/latex/en/reference/padics'

comment:40 Changed 3 weeks ago by jdemeyer

* ping *

comment:41 Changed 3 weeks ago by roed

Thanks for the ping. I had a visitor this week, but he just left so I'll take a look.

Note: See TracTickets for help on using tickets.