On Thu, May 5, 2011 at 12:35 PM, Ronan Lamy <[email protected]> wrote:
>
> >   So what is the issue with this solution:
> > -
> https://github.com/haz/sympy/commit/fb750ea49b963fa12d3a3e2dc833e53931050160
> >
> >
> >   I don`t see it as too hackish, since it simply shifts the use of the
> > cache from being always on to being used for a single calculation. The
> > solution in the branch from last year was indeed more of a hack
> > (flushed the cache whenever an assumption was added or removed from
> > the global assumption context). If the above solution is adopted, this
> > deals with 2-5 (as far as I can see).
>
> That's very much a hack. It makes top-level calls behave differently
> from inner calls, in a way that's hard to control. It's still wrong if
> assumptions change within a top-level call. And, since it uses global
> state, it'll break down completely in presence of threading (the rest of
> sympy isn't likely to be thread-safe either, though) or if an exception
> is raised.
>

  Threading has never been a requirement (as far as I am aware of) at making
these decisions. The correctness of the system should not be affected by
when the cache is used (or the cache is being used incorrectly). I think
it's perfectly reasonable to regulate when the cache is used for the top
level calls.

  Alternatively, we can simply stipulate that the cache is off by default,
and only enabled when needed (e.g., when a gruntz calculation begins).

>   The big questions that remain are those involving (1): it is
> > generally accepted that the old assumption system should give way to
> > the new one, but to what extent we remove the old ones from the core?
> > How the new ones replace the old ones? What is the syntax that we will
> > use for them? What "assumptions" will we make about the assumption
> > system? (i.e., local -vs- global context by default)
> >
> For the syntax, see http://code.google.com/p/sympy/issues/detail?id=2338


  Aye, I like that shift in syntax. But I'm speaking more of the whether or
not we include assumptions in Symbol creation, whether or not we pass around
contexts, whether or not assumptions are even consulted outside of refine /
ask, etc.

  Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy?hl=en.

Reply via email to