#14711: Weak references in the coercion graph
-------------------------------------+-------------------------------------
Reporter: jpflori | Owner: davidloeffler
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-6.1
Component: number fields | Resolution:
Keywords: memleak, number | Merged in:
field, QuadraticField | Reviewers: Jean-Pierre Flori
Authors: Simon King | Work issues:
Report Upstream: N/A | Commit:
Branch: | 0af59ea93689cb6abb9d3fae0f1cf11f2aee5cca
u/jpflori/ticket/14711 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by tscrim):
Replying to [comment:174 SimonKing]:
> Replying to [comment:172 nbruin]:
> > Presently, that routine gets used internally as well. The internal
routine should of course NOT copy the map, so changing that would imply
renaming the present routine to an underscore method and writing a new
wrapper that does the copying ... and changing the internal code to use
the new underscore method.
>
> Would this really be so difficult?
Isn't all of the coercion model consolidated in `coerce.pyx` and
`parent.pyx`? I can make a more detailed look and work on this tomorrow.
> > > Also couldn't we use (some form of) #8878 get around some of the
backtracking issues?
> >
> > This is outside the scope of this ticket.
>
> Yes, but it is an interesting idea. Given the difficulties in #15303, it
would actually be worth while to go beyond and create an actual digraph
for dealing both with the search for coerce maps (and given an actual
graph, it might be easier to instrument graph algorithms) and strong/weak
references, caching of maps and so on.
I was thinking it was outside of the scope of this ticket, but wasn't sure
from the discussion if something like that was needed as a dependency.
Although that's basically what we have currently (if I'm reading the code
right). To do more of the graph algorithms, it might be worthwhile to also
store the data in other formats (ex. a map of parents to an array of their
"neighbors") depending on what is useful.
--
Ticket URL: <http://trac.sagemath.org/ticket/14711#comment:177>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.