#8734: make sage variables unique in maxima
-------------------------------------+-------------------------------------
       Reporter:  jason              |        Owner:  jason
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.3
      Component:  interfaces         |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jason Grout, Ralf  |    Reviewers:  Volker Braun, Paul
  Stephan                            |  Zimmerman, Karl-Dieter Crisman
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/rws/ticket/8734-1                |  2c68026320ba3c516cd94fa1721e886ecd732804
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by rws):

 Replying to [comment:41 kcrisman]:
 > > > * Commit  be9367 (where you add a try/except clause in `_create`) -
 what sort of situation is that catching?
 > > There are several places where maxima.eval() is called and where
 exceptions are thrown. This one was simply overlooked, so that change
 fixes an unreported bug.
 > Hmm, okay.  I don't see how `_create` could have asked for an evaluation
 of this type, but I suppose.
 It is really easy to find it out yourself: just change `RuntimeError` to
 something different like `NotImplementedError`, doctest, and you'll get:
 {{{
 sage -t src/sage/tests/french_book/recequadiff.py
 **********************************************************************
 File "src/sage/tests/french_book/recequadiff.py", line 247, in
 sage.tests.french_book.recequadiff
 Failed example:
     desolve(eq1,[f,x])
 Expected:
     Traceback (most recent call last):
       ...
     TypeError: Computation failed ...
     Is k positive, negative or zero?
 Got:
     <BLANKLINE>
     Traceback (most recent call last):
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 480, in _run
         self.execute(example, compiled, test.globs)
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 839, in execute
         exec compiled in globs
       File "<doctest sage.tests.french_book.recequadiff[64]>", line 1, in
 <module>
         desolve(eq1,[f,x])
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/calculus/desolvers.py", line 436, in desolve
         soln = P(cmd)
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/interfaces/interface.py", line 199, in __call__
         return cls(self, x, name=name)
       File "/home/ralf/sage/local/lib/python2.7/site-
 packages/sage/interfaces/interface.py", line 626, in __init__
         raise TypeError(x)
     TypeError: ECL says: Maxima asks: Is _SAGE_VAR_k positive, negative or
 zero?
 }}}
 > > > * Commit  ced268 (where you generalized the missing assumptions) -
 what situation is that additionally catching?  Was that a case of Maxima
 asking questions which we didn't catch (and hence doctest) before?
 > > No, it reduces code duplication. Recommended reading:
 https://en.wikipedia.org/wiki/Code_refactoring
 > I'm not referring to that; in fact, I fully agreed with that strategy in
 earlier comments.  My question is specifically about `jj=2` - since
 usually `jj=3` seems to be the old case.  We should test a new branch,
 which this appears to be (though it may just be something obvious I'm not
 seeing).
 There were cases where there were two spaces in the output after 'Is '.
 > > > * I assume you are more than happy with Jason's original patch doing
 the basic functionality, right?
 > > Yes and no. A lot was missing.
 > I mean in terms of reviewing that for the ''basic'' functionality for
 proper conversion.  Naturally you provided a huge amount of missing stuff!
 I think his ansatz was what I would have done, too.
 > > > So these are pretty minor things and hopefully I'll be able to find
 some time for the DE part (or someone else will!) and we'll be on our way!
 It certainly looks like you were VERY thorough in finding places that
 might cause trouble.  The difficulty is that one might miss some places it
 is needed because in the absence of adding `_SAGE_VAR_` things should
 still work, so one might not know if we missed one.  Thanks!
 > > I would assume this is caught by all those doctests using maxima.
 > That's my point - they may NOT catch a missing one, since we only remove
 things via search-and-replace-with-empty-string, and everything worked
 before.
 Can you please clarify: "one might miss some places it is needed"---what's
 the it here?

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