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

convert all of Sage library code to libgap #26902

Open
dimpase opened this issue Dec 15, 2018 · 12 comments
Open

convert all of Sage library code to libgap #26902

dimpase opened this issue Dec 15, 2018 · 12 comments

Comments

@dimpase
Copy link
Member

dimpase commented Dec 15, 2018

It's about time. The sooner this is done, the fewer code to cross pexpect gap/libgap boundary will have to be written.
Some completed tickets aiming at this: #26750, #26889, #27234, #28504, #28818, #28820, #34769, #34770, #34737, #34771

Also related:
#27923, #27911, #27878

Following completion of this work, we can look into formally deprecating the pexpect interface to GAP: #26963.

Component: interfaces

Keywords: gap libgap

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

@dimpase dimpase added this to the sage-8.6 milestone Dec 15, 2018
@embray

This comment has been minimized.

@embray
Copy link
Contributor

embray commented Jan 15, 2019

comment:2

Retarging tickets optimistically to the next milestone. If you are responsible for this ticket (either its reporter or owner) and don't believe you are likely to complete this ticket before the next release (8.7) please retarget this ticket's milestone to sage-pending or sage-wishlist.

@embray embray modified the milestones: sage-8.6, sage-8.7 Jan 15, 2019
@soehms

This comment has been minimized.

@soehms
Copy link
Member

soehms commented Feb 7, 2019

comment:3

I've created a follow up ticket #27234 to #26750, since by the improvements in connection with GAP 4.10 upgrade, the implementation of the gap method of class PermutationGroupElement can be done properly, right now.

@embray
Copy link
Contributor

embray commented Mar 25, 2019

comment:4

Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)

@embray embray modified the milestones: sage-8.7, sage-8.8 Mar 25, 2019
@embray
Copy link
Contributor

embray commented Jun 14, 2019

comment:5

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

@embray embray removed this from the sage-8.8 milestone Jun 14, 2019
@embray
Copy link
Contributor

embray commented Dec 13, 2019

Changed keywords from none to gap libgap

@embray

This comment has been minimized.

@dimpase
Copy link
Member Author

dimpase commented Nov 21, 2022

comment:7

see #25477 for a long discussion on performance of GAP vs Cython.
Here is the current (Sage 9.8.beta3) list of modules using pexpect GAP, i.e.
sage.interfaces.gap

src/sage/coding/binary_code.pyx:                    from sage.interfaces.gap import gap
src/sage/coding/linear_code.py:from sage.interfaces.gap import gap

src/sage/combinat/matrices/latin.py:from sage.interfaces.gap import GapElement

src/sage/combinat/root_system/weyl_group.py:from sage.interfaces.gap import gap
src/sage/groups/class_function.py:from sage.interfaces.gap import gap
src/sage/groups/perm_gps/constructor.py:from sage.interfaces.gap import GapElement
src/sage/groups/perm_gps/cubegroup.py:from sage.interfaces.gap import gap
src/sage/groups/perm_gps/permgroup.py:from sage.interfaces.gap import GapElement
src/sage/groups/perm_gps/permgroup_element.pyx:            from sage.interfaces.gap import gap
src/sage/interfaces/gap3.py:from sage.interfaces.gap import Gap_generic, GapElement_generic
src/sage/libs/gap/element.pyx:        from sage.interfaces.gap import gap
src/sage/misc/randstate.pyx:            from sage.interfaces.gap import gap
src/sage/modular/arithgroup/arithgroup_perm.py:        from sage.interfaces.gap import gap
src/sage/rings/finite_rings/element_givaro.pyx:            from sage.interfaces.gap import gfq_gap_to_sage
src/sage/rings/finite_rings/element_ntl_gf2e.pyx:from sage.interfaces.gap import is_GapElement
src/sage/rings/finite_rings/element_pari_ffelt.pyx:from sage.interfaces.gap import is_GapElement
src/sage/rings/finite_rings/integer_mod_ring.py:                from sage.interfaces.gap import intmod_gap_to_sage
src/sage/topology/simplicial_complex.py:        from sage.interfaces.gap import g

In particular, even libgap is using sage.interfaces.gap - for GAP help system.

@dimpase

This comment has been minimized.

@dimpase

This comment has been minimized.

@dimpase

This comment has been minimized.

kryzar pushed a commit to kryzar/sage that referenced this issue Feb 6, 2023
this is just a 1-line change.

A part of sagemath#26902

URL: https://trac.sagemath.org/34769
Reported by: dimpase
Ticket author(s): Dima Pasechnik
Reviewer(s): John Palmieri
kryzar pushed a commit to kryzar/sage that referenced this issue Feb 6, 2023
…bgap in sage/rings/finite_rings

implement coercion from libgap's finite fields, to fix e.g.
{{{
sage: F=GF(25)
sage: F(libgap.Z(25)^3)
------------------------------------------------------------------------
---
TypeError                                 Traceback (most recent call
last)
...
TypeError: unable to coerce <class
'sage.libs.gap.element.GapElement_FiniteField'>
}}}

With the ticket branch, this works:
{{{
sage: F=GF(25)
sage: F(libgap.Z(25)^3)
4*z2 + 3
}}}

------------------------------------

As well, we switch to use libgap instead of pexpect GAP - internally
in the affected files. This is a part of sagemath#26902

URL: https://trac.sagemath.org/34770
Reported by: dimpase
Ticket author(s): Dima Pasechnik
Reviewer(s): Matthias Koeppe
kryzar pushed a commit to kryzar/sage that referenced this issue Feb 6, 2023
after sagemath#34737 there are still uses of pexpect GAP left there.
We remove them on this ticket.

Part of sagemath#26902

URL: https://trac.sagemath.org/34771
Reported by: dimpase
Ticket author(s): Dima Pasechnik
Reviewer(s): Vincent Delecroix, Matthias Koeppe
@dimpase dimpase mentioned this issue Mar 2, 2023
1 task
@dimpase dimpase self-assigned this Mar 2, 2023
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

3 participants