#17503: pickled symbolic function breaks maxima interface
-------------------------------------------------+-------------------------
       Reporter:  wonder                         |        Owner:
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-6.4
      Component:  interfaces                     |   Resolution:
       Keywords:  pickle, maxima, symbolic,      |    Merged in:
  function, sr_to_max                            |    Reviewers:
        Authors:                                 |  Work issues:
Report Upstream:  N/A                            |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Comment (by nbruin):

 This hints at a problem:
 {{{
 sage: function('z') is function('z')
 False
 sage: function('z') == function('z')
 True
 sage: function('z') == loads(dumps(function('z'))) #as expected
 True
 sage: function('z')(x).operator() == function('z')(x).operator()
 True
 sage: function('z')(x).operator() ==
 loads(dumps(function('z')(x))).operator() #this should also be true
 False
 }}}
 It seems to me that pynac expressions don't properly get pickled:
 {{{
 sage: explain_pickle(dumps(z))
 pg_unpickle_function = unpickle_global('sage.symbolic.function_factory',
 'unpickle_function')
 pg_unpickle_function('z', 0r, None, None, True, [None, None, None, None,
 None, None, None, None, None, None, None])
 sage: explain_pickle(dumps(z(x)))
 pg_Expression = unpickle_global('sage.symbolic.expression', 'Expression')
 si = unpickle_newobj(pg_Expression, ())
 unpickle_build(si, (0r, ['x'],
 
'GARC\x03\tfunction\x00class\x00symbol\x00x\x00name\x00seq\x00python\x00z\x00sage_ex\x00\x01\x08\x01\x02\x02\n\x02"\x03\x04\n\x00+\x001\x00"\x07'))
 si
 }}}
 As you can see, there doesn't seem to be a reference to
 "unpickle_function" which should really be triggered by pickling an
 expression that contains 'z'.

--
Ticket URL: <http://trac.sagemath.org/ticket/17503#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.

Reply via email to