#10327: Problems with get_systems and symbolic expressions
-------------------------+--------------------------------------------------
   Reporter:  jpflori    |       Owner:  burcin
       Type:  defect     |      Status:  new   
   Priority:  minor      |   Milestone:        
  Component:  symbolics  |    Keywords:        
     Author:             |    Upstream:  N/A   
   Reviewer:             |      Merged:        
Work_issues:             |  
-------------------------+--------------------------------------------------
 I'm using Sage 4.6.1.alpha2 with Pynac 0.2.1.

 get_systems raises an error when called on a user created variable (but
 not on 'x'):

 {{{
 sage: get_systems('x+x')
 []
 sage: get_systems('x*x')
 []
 sage: a = var('a')
 sage: get_systems('a+a')
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/jp/boulot/sage/sage-current/<ipython console> in <module>()

 /home/jp/boulot/sage/sage-current/local/lib/python2.6/site-
 packages/sage/misc/citation.so in sage.misc.citation.get_systems
 (sage/misc/citation.c:873)()

 /home/jp/boulot/sage/sage-current/local/lib/python/cProfile.pyc in
 runctx(statement, globals, locals, filename)
      47     try:
      48         try:
 ---> 49             prof = prof.runctx(statement, globals, locals)
      50         except SystemExit:
      51             pass

 /home/jp/boulot/sage/sage-current/local/lib/python/cProfile.pyc in
 runctx(self, cmd, globals, locals)
     138         self.enable()
     139         try:
 --> 140             exec cmd in globals, locals
     141         finally:
     142             self.disable()

 /home/jp/boulot/sage/sage-current/<string> in <module>()

 TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
 sage: get_systems('a*a')
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /home/jp/boulot/sage/sage-current/<ipython console> in <module>()

 /home/jp/boulot/sage/sage-current/local/lib/python2.6/site-
 packages/sage/misc/citation.so in sage.misc.citation.get_systems
 (sage/misc/citation.c:873)()

 /home/jp/boulot/sage/sage-current/local/lib/python/cProfile.pyc in
 runctx(statement, globals, locals, filename)
      47     try:
      48         try:
 ---> 49             prof = prof.runctx(statement, globals, locals)
      50         except SystemExit:
      51             pass

 /home/jp/boulot/sage/sage-current/local/lib/python/cProfile.pyc in
 runctx(self, cmd, globals, locals)
     138         self.enable()
     139         try:
 --> 140             exec cmd in globals, locals
     141         finally:
     142             self.disable()

 /home/jp/boulot/sage/sage-current/<string> in <module>()

 TypeError: unsupported operand type(s) for *: 'NoneType' and 'NoneType'
 }}}
 Similarly, get_systems('2**a') and get_systems('a**2') gives an error with
 None_Type

 Moreover I get a segfault when calling get_systems on a power with
 symbolic expressions as base and exponent.

 {{{
 sage: from sage.misc.citation import get_systems
 sage: get_systems('x**x')
 []
 sage: a = var('a')
 sage: get_systems('a**x')

 Program received signal SIGSEGV, Segmentation fault.
 0x00007fffd636b5c8 in
 __pyx_pf_4sage_8symbolic_10expression_10Expression___pow__
 (__pyx_v_self=0x7ffff7dab0f0, __pyx_v_exp=0x42c03f8,
 __pyx_v_ignored=<value optimized out>) at
 sage/symbolic/expression.cpp:12008
 12008         __pyx_t_1 = ((PyObject *)((struct
 __pyx_vtabstruct_4sage_8symbolic_10expression_Expression
 
*)__pyx_v_base->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->coerce_in(__pyx_v_base,
 __pyx_v_exp)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1];
 __pyx_lineno = 2447; __pyx_clineno = __LINE__; goto __pyx_L5_error;}

 }}}
 and :

 {{{
 sage: a = var('a')
 sage: get_systems('x**a')

 Program received signal SIGSEGV, Segmentation fault.
 ptr (__pyx_v_self=<value optimized out>, __pyx_v_exp=0x7ffff7dab0f0,
 __pyx_v_ignored=<value optimized out>) at /home/jp/boulot/sage/sage-
 current/local//include/pynac/ptr.h:73
 73              ptr(const ptr & other) throw() : p(other.p) {
 p->add_reference(); }

 }}}
 I'll have a deeper look at it later, but I have no idea of how get_systems
 work yet.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10327>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to