#16275: Hom: introduce a check argument to simplify the unpickling detection
logic
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.2
Component: categories | Resolution:
Keywords: homset, pickling | Merged in:
Authors: Nicolas M. ThiƩry | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/nthiery/hom__introduce_a_check_argument_to_simplify_the_unpickling_detection_logic|
1ff993bb8e1af3eaae79255a4b97cc4b5afe39bf
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nthiery):
Just in case this helps, here is an extract of how quotients of
multivariate polynomial rings are unpickled. We see in the
construction of si8 Hom being called on the parents si5 and si7, where
si5 (the resulting quotient ring) has been allocated by
unpickle_newobj, but not yet initialized by unpickle_build:
{{{
sage: P.<x,y> = QQ['x,y']
sage: Q = P.quotient([x^2-1,y^2-1])
sage: Q.an_element()
sage: explain_pickle(dumps(Q))
...
si4 = pg_dynamic_class('QuotientRing_generic_with_category',
(pg_QuotientRing_generic, pg_getattr(si3, 'parent_class')), None, None,
pg_QuotientRing_generic)
si5 = unpickle_newobj(si4, ())
...
pg_Hom = unpickle_global('sage.categories.homset', 'Hom')
pg_unpickle_MPolynomialRing_libsingular =
unpickle_global('sage.rings.polynomial.multi_polynomial_libsingular',
'unpickle_MPolynomialRing_libsingular')
...
si7 = pg_unpickle_MPolynomialRing_libsingular(pg1, ('x', 'y'), si6)
...
si8 = pg_unpickle_map(pg_RingMap_lift, pg_Hom(si5, si7,
pg_unreduce(pg_Sets, (), {}), False), {}, {'_codomain':si7, 'S':si7,
'_domain':si5, '_repr_type_str':None})
...
unpickle_build(si5, {'_QuotientRing_nc__lift':si8, '_embedding':None,
'_initial_action_list':[], '_convert_method_name':None,
'_QuotientRing_nc__cover':si9, '_category':si3, '_names':('xbar', 'ybar'),
'cover':pg_CachedMethodPickle(si5, 'cover', si9),
'lifting_map':pg_CachedMethodPickle(si5, 'lifting_map', si8),
'_QuotientRing_nc__R':si7,
'element_class':pg_dynamic_class('QuotientRing_generic_with_category.element_class',
(pg_QuotientRingElement, pg_getattr(si3, 'element_class')), None, None,
None), '_generators':{}, '_QuotientRing_nc__I':si10, '_base':pg1,
'_pickle_version':1r,
'_element_constructor':pg_unpickleMethod('_element_constructor_', si5,
si4), '_initial_convert_list':[], '_element_init_pass_parent':False,
'_cdata':None, '_initial_coerce_list':[]})
si5
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/16275#comment:4>
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/d/optout.