|
| 1 | +# TODO |
| 2 | + |
| 3 | +## Automatic generation of the .pxd file? |
| 4 | + |
| 5 | + xdress maybe? did not manage to install: complaining when trying to |
| 6 | + link against clang libraries that are provided as static libraries. |
| 7 | + |
| 8 | +## Automatic generation of the Python wrappers? |
| 9 | + |
| 10 | +## Fetch features from Sage's experimental interface to Semigroupe |
| 11 | + |
| 12 | + https://trac.sagemath.org/attachment/ticket/8360/trac_8360_semigroupe-interface-nt.patch |
| 13 | + |
| 14 | +## Use pos_t rather than size_t everywhere relevant |
| 15 | + |
| 16 | +Problem: pos_t is a private typedef in the Semigroup class; this makes |
| 17 | +it harder to use it elsewhere |
| 18 | + |
| 19 | +## new_from_handle would naturally be a class method |
| 20 | + |
| 21 | +Question: how to achieve this in Cython? |
| 22 | + |
| 23 | +## libsemigroups configuration |
| 24 | + |
| 25 | +- DEFAULT_REPORT_VALUE : is there a gain in making it a const? |
| 26 | +- DEFAULT_NR_THREADS : make a new default value? or an attribute of the semigroup? |
| 27 | + |
| 28 | +## Fix memory management |
| 29 | + |
| 30 | +Problem: when we get back a pointer to an Element from libsemigroup; |
| 31 | +when shall we consider that we own it or not? |
| 32 | + |
| 33 | +At this stage when semigroups.pyx returns a wrapper around a |
| 34 | +libsemigroup element, it is always assumed that libsemigroup owns that |
| 35 | +element. Which is wrong when the element is part of the internal data |
| 36 | +structure for the semigroup. This quickly leads to segmentation faults |
| 37 | +with the following backtrace: |
| 38 | + |
| 39 | + #1 0x00007ffef6343ef3 in __pyx_pf_10semigroups_7Element_2__dealloc__ (__pyx_v_self=0x7ffff011baf0) at semigroups.cpp:1382 |
| 40 | + #2 __pyx_pw_10semigroups_7Element_3__dealloc__ (__pyx_v_self=) at semigroups.cpp:1354 |
| 41 | + #3 __pyx_tp_dealloc_10semigroups_Element (o=) at semigroups.cpp:3240 |
| 42 | + #4 0x00007ffff7a44711 in list_dealloc (op=) at Objects/listobject.c:309 |
| 43 | + #5 0x00007ffff7a56c13 in PyDict_Clear (op=<optimized out>) at Objects/dictobject.c:946 |
| 44 | + #6 0x00007ffff7a56c99 in dict_clear (mp=<optimized out>) at Objects/dictobject.c:2028 |
| 45 | + #7 0x00007ffff7ac9ef2 in call_function (oparg=<optimized out>, pp_stack=0x7fffffffc370) at Python/ceval.c:4336 |
| 46 | + |
| 47 | +How to fix this? |
| 48 | + |
| 49 | +Plausibly, we should |
| 50 | + |
| 51 | +- have a parameter in new_from_handle to decide whether the instance |
| 52 | + owns the handle or is just a view on it. |
| 53 | + |
| 54 | +- review all methods of Semigroup, and call new_from_handle appropriately |
0 commit comments