2009/8/12 Fabian Pedregosa <fab...@fseoane.net> > > Vinzent Steinberg wrote: > > > > Some questions: > > > > You did remove some tests. Are these things tested elsewhere? Things like > > > > >>> ask(2*n+1, Q.odd, Assume(n, Q.integer)) > > True > > I think that's in sympy/queries/tests/test_query.py line 797 > > > > > You seem to break (2*n).is_even, because it's no longer possible to tie > > to n that it's an integer. So I would rather remove it altogether. > > You can still tie integer to n, it's just that method .is_even is > missing, although not removed (it does not raise an exception when you > try to access it) because in file sympy/core/assumptions.py zero is > defined as: > > 'zero -> infinitesimal & even', > > but removing that line makes breaks a lot of things. > > I wonder if it's better to remove the old system altogether (which will > be a huge chunk of code) or in several steps.
I would not remove it as long as the new system can replace it without regressions in performance or functionality. I also would not remove it before 0.7. > > > > > > Also performance got much worse, you can even watch the difference > > between the old > > > > >>> n = Symbol('n', integer=True) > > >>> (2*n).is_even > > True > > > > and the new > > > > >>> ask(2*n, Q.even, Assume(n, Q.integer)) > > True > > > > But that's not a problem, because I think you did not yet look for > > performance. It's better to have the functionality first, but we will > > need to care about the performance, before releasing at the latest. > > > Yes, current bottleneck is the dpll algorithm, which I call naively > couple of times in ask(). I have some notes on how to improve speed in > doc/src/modules/queries.txt. > > > Also, using integers for internal data representation which would not be > too difficult to implement (in logic.algorithms.dpll) should make it a > lot faster, see > > http://code.google.com/p/sympy/issues/detail?id=1545 This sounds good! Looking forward. Vinzent --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to sympy-patches@googlegroups.com To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en -~----------~----~----~----~------~----~------~--~---