Ticket #7508 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

hash collisions for derivatives of symbolic functions - act 3

Reported by: burcin Owned by: burcin
Priority: major Milestone: sage-4.3
Component: symbolics Keywords: pynac
Cc: Work issues:
Report Upstream: N/A Reviewers: Karl-Dieter Crisman
Authors: Burcin Erocal Merged in: sage-4.3.rc0
Dependencies: Stopgaps:

Description

Reported by Alex Raichev on sage-support:

----------------------------------------------------------------------
| Sage Version 4.2.1, Release Date: 2009-11-14                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: X= var('x,y,z')
sage: f= function('f',*X); f
f(x, y, z)
sage: d= {}
sage: for l in [1..2]:
....:     for s in UnorderedTuples(X,l):
....:         print diff(f,s)
....:         d[diff(f,s)]= 69
....:
D[0](f)(x, y, z)
D[1](f)(x, y, z)
D[2](f)(x, y, z)
D[0, 0](f)(x, y, z)
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call
last)
...
/Applications/sage/local/lib/python2.6/site-packages/sage/symbolic/
expression_conversions.py in derivative(self, ex, operator)
    344             NotImplementedError: derivative
    345         """
--> 346         raise NotImplementedError, "derivative"  
    347
    348     def arithmetic(self, ex, operator):

NotImplementedError: derivative

This is another form of the problem I couldn't fix in #6243 and #6851.

Attachments

trac_7508-fderivative_hash_collision_doctest.patch Download (1.3 KB) - added by burcin 3 years ago.
add doctests

Change History

Changed 3 years ago by burcin

add doctests

comment:1 Changed 3 years ago by burcin

  • Status changed from new to needs_review
  • Report Upstream set to N/A
  • Authors set to Burcin Erocal

This is fixed (hopefully, for good) in the new pynac package here:

 http://sage.math.washington.edu/home/burcin/pynac/pynac-0.1.10.spkg

attachment:trac_7508-fderivative_hash_collision_doctest.patch Download adds doctests for the fix.

Note that the new pynac version also contains fixes for #7264 and #7406. Tests should be run with the patches from those tickets also applied in this order:

This ticket now depends on #7490.

comment:2 Changed 3 years ago by kcrisman

  • Status changed from needs_review to positive_review

Positive review.

comment:3 Changed 3 years ago by kcrisman

I should point out that #7264 has a problem, so the spkg should not be merged until that is resolved.

comment:4 Changed 3 years ago by mhansen

  • Status changed from positive_review to closed
  • Reviewers set to Karl-Dieter Crisman
  • Resolution set to fixed
  • Merged in set to sage-4.3.rc0
Note: See TracTickets for help on using tickets.