Fwd: fricas-1.0.6.p0.spkg

0 visualização
Pular para a primeira mensagem não lida

Bill Page

não lida,
19 de jun. de 2009, 10:23:5519/06/2009
para sage-devel, fricas-devel
---------- Forwarded message ----------
From: Adam Webb <adamwe...@yahoo.com>
Date: Fri, Jun 19, 2009 at 5:55 AM
Subject: fricas-1.0.6.p0.spkg
To: bill...@newsynthesis.org

Hi Bill,

I threw together a Sage package. (fricas-1.0.6.p0.spkg,
http://www.mediafire.com/file/whwmdzfimg2) The big change is that the
new version of fricas does not install an 'axiom' script. This makes
sense to me. I assume that if someone wanted to, they could install
axiom into sage as an (separate) optional package. The install worked
but there were a few errors that came up in testing. They seem to be
related to expect.

I found these running sage -t --optional fricas.py which gave the result:

......
 traceback ommited
.....
2 items had failures:
  2 of  21 in __main__.example_0
  2 of   8 in __main__.example_11
***Test Failed*** 4 failures.
For whitespace errors, see the file
/home/adamwebb/local/sage/tmp/.doctest_fricas.py
        [8.0 s]
exit code: 1024

----------------------------------------------------------------------
The following tests failed:


       sage -t --optional "devel/sage-main/build/sage/interfaces/fricas.py"

from __main__.example_11

sage: from sage.interfaces.fricas import __doctest_cleanup
sage: a = FriCAS()
sage: two = a(2)     #optional - fricas  <=====    gives error
sage: a.is_running() #optional - fricas
True
sage: __doctest_cleanup()
sage: a.is_running()
False

The traceback is:
sage: from sage.interfaces.fricas import __doctest_cleanup
sage: a = FriCAS()
sage: two = a(2)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/adamwebb/.sage/temp/haso220w/18889/_home_adamwebb__sage_init_sage_0.py
in <module>()

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc
in __call__(self, x, name)
  1024             return cls(self, x, name=name)
  1025         try:
-> 1026             return self._coerce_from_special_method(x)
  1027         except TypeError:
  1028             raise

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc
in _coerce_from_special_method(self, x)
  1048             s = '_gp_'
  1049         try:
-> 1050             return (x.__getattribute__(s))(self)
  1051         except AttributeError:
  1052             return self(x._interface_init_())

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/structure/sage_object.so
in sage.structure.sage_object.SageObject._axiom_
(sage/structure/sage_object.c:3875)()

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/structure/sage_object.so
in sage.structure.sage_object.SageObject._interface_
(sage/structure/sage_object.c:2853)()

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc
in __call__(self, x, name)
  1022
  1023         if isinstance(x, basestring):
-> 1024             return cls(self, x, name=name)
  1025         try:
  1026             return self._coerce_from_special_method(x)

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc
in __init__(self, parent, value, is_name, name)
  1426             except (TypeError, KeyboardInterrupt, RuntimeError,
ValueError), x:
  1427                 self._session_number = -1
-> 1428                 raise TypeError, x
  1429         self._session_number = parent._session_number
  1430

TypeError: Unable to start axiom because the command 'axiom -nox
-noclef' failed.

From __main__.example_0

sage: a = fricas(x+2); a
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/adamwebb/.sage/temp/haso220w/18889/_home_adamwebb__sage_init_sage_0.py
in <module>()

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc
in __call__(self, x, name)
  1024             return cls(self, x, name=name)
  1025         try:
-> 1026             return self._coerce_from_special_method(x)
  1027         except TypeError:
  1028             raise

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc
in _coerce_from_special_method(self, x)
  1048             s = '_gp_'
  1049         try:
-> 1050             return (x.__getattribute__(s))(self)
  1051         except AttributeError:
  1052             return self(x._interface_init_())

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/structure/sage_object.so
in sage.structure.sage_object.SageObject._fricas_
(sage/structure/sage_object.c:4113)()

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/symbolic/expression.so
in sage.symbolic.expression.Expression._interface_
(sage/symbolic/expression.cpp:3275)()

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/structure/sage_object.so
in sage.structure.sage_object.SageObject._interface_
(sage/structure/sage_object.c:2716)()

/home/adamwebb/local/sage/local/lib/python2.5/site-packages/sage/structure/sage_object.so
in sage.structure.sage_object.SageObject._fricas_init_
(sage/structure/sage_object.c:4164)()

TypeError: _interface_init_() takes exactly one argument (0 given)


cheers,
Adam Webb

     __________________________________________________________________
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for
Yahoo!  Get it Now for Free! at
http://downloads.yahoo.com/ca/internetexplorer/

William Stein

não lida,
19 de jun. de 2009, 12:49:2919/06/2009
para sage-...@googlegroups.com, fricas-devel
On Fri, Jun 19, 2009 at 4:23 PM, Bill Page<bill...@newsynthesis.org> wrote:
>
> ---------- Forwarded message ----------
> From: Adam Webb <adamwe...@yahoo.com>
> Date: Fri, Jun 19, 2009 at 5:55 AM
> Subject: fricas-1.0.6.p0.spkg
> To: bill...@newsynthesis.org
>
>
>
> Hi Bill,
>
> I threw together a Sage package. (fricas-1.0.6.p0.spkg,
> http://www.mediafire.com/file/whwmdzfimg2) The big change is that the
> new version of fricas does not install an 'axiom' script. This makes
> sense to me. I assume that if someone wanted to, they could install
> axiom into sage as an (separate) optional package. The install worked
> but there were a few errors that came up in testing. They seem to be
> related to expect.
>
> I found these running sage -t --optional fricas.py which gave the result:

There are many known failures in Sage's optional doctests. I went
through and reported them all a few days ago as trac tickets. There
were *already* tons with the Sage/Fricas interface:

http://trac.sagemath.org/sage_trac/ticket/6318

So maybe you aren't seeing new failures.
--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

maxthemouse

não lida,
20 de jun. de 2009, 05:43:2920/06/2009
para FriCAS - computer algebra system

> There are many known failures in Sage's optional doctests.  I went
> through and reported them all a few days ago as trac tickets.  There
> were *already* tons with the Sage/Fricas interface:
>
> http://trac.sagemath.org/sage_trac/ticket/6318
>
> So maybe you aren't seeing new failures.
>
>
That is correct, the errors I saw are known. I tried some of the
reported ones again and at least a few of the fricas ones seemed to be
working now. This is with fricas 1.0.6 and patching the FriCAS class.

Adam

maxthemouse

não lida,
26 de jun. de 2009, 10:13:5426/06/2009
para FriCAS - computer algebra system
I am have been looking into the many errors reported in trac #6318
(http://trac.sagemath.org/sage_trac/ticket/6318). Most seem to be due
to only one problem, namely passing Sage symbolic expressions. This
has been mentioned elsewhere: http://groups.google.com/group/sage-devel/browse_thread/thread/7e3b729d6bb58a36#


A fricas specific thing seems to cause two errors. The returned type
is different in fricas than from axiom in some cases.

example 1:
sage: a = axiom('Fraction Integer')
sage: print a
Fraction Integer

sage: b = fricas('Fraction Integer')
sage: print b
Fraction(Integer)

When the type is one word like 'Integer' they give the same string.

example 2:
sage: two = fricas(2)
sage: two.comma(3)
[2,3]
sage: two.comma(3,4)
[2,3,4]
sage: _.type()
Tuple(PositiveInteger) <======== expected result is Tuple
PositiveInteger

There is a specific line in the type() method of
axiom.PanAxiomElement that evaluates self.name() and receives a string
from axiom or fricas which contains the type information. I am
guessing that it is also used to make the print string. The change
breaks the tests. Is the change intentional or accidental? Someone
from fricas will have to say.

I hope this helps.

Cheers,
Adam

Bill Page

não lida,
26 de jun. de 2009, 10:30:1826/06/2009
para fricas...@googlegroups.com
On Fri, Jun 26, 2009 at 10:13 AM, maxthemouse wrote:
>
> I am have been looking into the many errors reported in trac #6318
> (http://trac.sagemath.org/sage_trac/ticket/6318). Most seem to be due
> to only one problem, namely passing Sage symbolic expressions.
> This has been mentioned elsewhere:
> http://groups.google.com/group/sage-devel/browse_thread/thread/7e3b729d6bb58a36#
>

The conversion of Sage expressions to "axiom" syntax is not done in
the axiom/fricas.py interface but in several other places in Sage. You
might want to try

sage: set_verbose(10)

to see more of what is going on.

>
> A fricas specific thing seems to cause two errors. The returned type
> is different in fricas than from axiom in some cases.
>
> example 1:
> sage: a = axiom('Fraction Integer')
> sage: print a
> Fraction Integer
>
> sage: b = fricas('Fraction Integer')
> sage: print b
> Fraction(Integer)
>
> When the type is one word like 'Integer' they give the same string.
>

This is an expected difference between Axiom and FriCAS.

> ...

Regards,
Bill Page.

Waldek Hebisch

não lida,
26 de jun. de 2009, 12:03:4926/06/2009
para fricas...@googlegroups.com
maxthemouse wrote:
>
> I am have been looking into the many errors reported in trac #6318
> (http://trac.sagemath.org/sage_trac/ticket/6318). Most seem to be due
> to only one problem, namely passing Sage symbolic expressions. This
> has been mentioned elsewhere: http://groups.google.com/group/sage-devel/browse_thread/thread/7e3b729d6bb58a36#
>
>
> A fricas specific thing seems to cause two errors. The returned type
> is different in fricas than from axiom in some cases.
>

> Tuple(PositiveInteger) <======== expected result is Tuple


> PositiveInteger
>
> There is a specific line in the type() method of
> axiom.PanAxiomElement that evaluates self.name() and receives a string
> from axiom or fricas which contains the type information. I am
> guessing that it is also used to make the print string. The change
> breaks the tests. Is the change intentional or accidental? Someone
> from fricas will have to say.
>

The change is intentional. This change is intended to make
parsing of FriCAS output easier. Compare sin x + 1 and
sin(x) + 1. Sage needs to adjust tests.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

maxthemouse

não lida,
26 de jun. de 2009, 13:41:4726/06/2009
para FriCAS - computer algebra system


>
> The change is intentional.  This change is intended to make
> parsing of FriCAS output easier.  Compare sin x + 1 and
> sin(x) + 1.  Sage needs to adjust tests.
>
> --
>                               Waldek Hebisch
> hebi...@math.uni.wroc.pl

Thanks for the clarification.

Adam

MaxTheMouse

não lida,
27 de jun. de 2009, 08:04:5327/06/2009
para FriCAS - computer algebra system
A patch for Sage based on the above is now at http://trac.sagemath.org/sage_trac/ticket/6318

All comments/changes/review welcome.

cheers,
Adam
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem