#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):

 OK, this is a very nice example. It seems that expression pickling
 *forces* functions to have a fixed arity. On the other hand, calling solve
 goes through the maxima strings interface, so its resulting functions have
 undeclared arity. That's why in the example given, the "nargs=1" has no
 effect: After calling "solve" it's stripped. The following does not
 produce an error:
 {{{
 sage: from sage.symbolic.function_factory import function
 sage: z=function('z',nargs=1)
 sage: z1=loads(dumps(z(x))).operator()
 sage: z==z1
 True
 sage: z is z1
 False
 sage: limit(z(x),x=0)
 limit(z(x), x, 0)
 sage: limit(z1(x),x=0)
 limit(z(x), x, 0)
 }}}
 So there are two issues at play in this ticket:
  - maxima's string interface doesn't deal with arity properly, see #17504
  - pickling of expressions doesn't deal with arity properly in another
 way.

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