Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maple interface completely broken with Maple 11 #2120

Closed
williamstein opened this issue Feb 9, 2008 · 19 comments
Closed

Maple interface completely broken with Maple 11 #2120

williamstein opened this issue Feb 9, 2008 · 19 comments

Comments

@williamstein
Copy link
Contributor

This is what we get for not running the optional doctests. Maple 10 still works fine. With Maple 11 the Sage interface is completely totally broken:

sage -t --only-optional=maple devel/sage/sage/symbolic/expression.pyx # 2 doctests failed
sage -t --only-optional=maple devel/sage/sage/symbolic/integration/integral.py # 2 doctests failed
sage -t --only-optional=maple devel/sage/sage/calculus/calculus.py # 1 doctests failed
sage -t --only-optional=maple devel/sage/sage/misc/functional.py # 1 doctests failed
sage -t --only-optional=maple devel/sage/sage/tests/benchmark.py # 5 doctests failed
sage -t --only-optional=maple devel/sage/sage/interfaces/maple.py # 123 doctests failed

Component: interfaces

Reviewer: Ralf Stephan

Issue created by migration from https://trac.sagemath.org/ticket/2120

@williamstein williamstein added this to the sage-5.11 milestone Feb 9, 2008
@williamstein williamstein self-assigned this Feb 9, 2008
@williamstein
Copy link
Contributor Author

comment:2

Attachment: trac-2120-maple_interface.patch.gz

The attached patch trac-2120-maple_interface.patch completely fixes all these problems on Maple with OS X. It may partly break things on Linux, maybe. (?) I don't have a good net connection with access to Linux Maple right now for testing, but will someday and then post a followup patch that fixes any issues.

NOTE: This patch vastly improves the robustness of the Maple interface, to put it mildly.

@williamstein williamstein changed the title maple -- the interface is completely broken in Sage-2.10.1 with Maple 11. [not ready for review] maple -- the interface is completely broken in Sage-2.10.1 with Maple 11. Feb 9, 2008
@craigcitro
Copy link
Member

Changed keywords from none to editor_craigcitro

@mwhansen
Copy link
Contributor

comment:4

I'll take care of this.

@williamstein
Copy link
Contributor Author

comment:5

With stock Maple 12 and stock sage-3.3.alpha0 on OS X, here's what happens (total disaster):

teragon-2:graphics wstein$ ~/build/sage-3.3.alpha0/sage
----------------------------------------------------------------------
| Sage Version 3.3.alpha0, Release Date: 2009-01-19                  |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: maple('2+2')

sage: maple('2+2')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/Users/wstein/.sage/temp/teragon_2.local/96783/_Users_wstein__sage_init_sage_0.py in <module>()
----> 1 
      2 
      3 
      4 
      5 

/Users/wstein/build/sage-3.3.alpha0/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc in __call__(self, x, name)
    963             return x
    964         if isinstance(x, basestring):
--> 965             return cls(self, x, name=name)
    966         try:
    967             return self._coerce_from_special_method(x)

/Users/wstein/build/sage-3.3.alpha0/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc in __init__(self, parent, value, is_name, name)
   1333             except (TypeError, KeyboardInterrupt, RuntimeError, ValueError), x:
   1334                 self._session_number = -1
-> 1335                 raise TypeError, x
   1336         self._session_number = parent._session_number
   1337 

TypeError: An error occured running a Maple command:
INPUT:
read "/Users/wstein/.sage//temp/teragon_2.local/96783//interface//tmp96783";
OUTPUT:
read "/Users/wstein/.sage//temp/teragon_2.local/96783//interface//tmp96783";
on line 2, syntax error, `)` unexpected:
age0);
    ^
Error, while reading
`/Users/wstein/.sage//temp/teragon_2.local/96783//interface//tmp96783`

@williamstein
Copy link
Contributor Author

comment:6

I tried today, and

  • maple 12 works fine on OS X (for me). Perfect in fact.
  • maple 12 on linux, fails totally:
wstein@sage:~$ sage
----------------------------------------------------------------------
| Sage Version 3.2.3, Release Date: 2009-01-05                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: maple('2+3')

sage: maple('2+3')
read "/scratch/wstein/sage//temp/sage.math.washington.edu/1285//interface/

@williamstein
Copy link
Contributor Author

comment:7

the poor attached patch:

Hunk #1 FAILED at 859
Hunk #2 succeeded at 1496 with fuzz 2 (offset 382 lines).
1 out of 2 hunks FAILED -- saving rejects to file sage/interfaces/expect.py.rej
patching file sage/interfaces/maple.py
Hunk #3 FAILED at 245
Hunk #4 FAILED at 390
Hunk #5 FAILED at 442
Hunk #6 FAILED at 606
4 out of 7 hunks FAILED -- saving rejects to file sage/interfaces/maple.py.rej

@ncalexan
Copy link
Mannequin

ncalexan mannequin commented Apr 1, 2009

comment:8

Attachment: trac-2120-maple_interface-2.patch.gz

The second patch rebases the much earlier patch. It makes doctests and the command line work for me on sage.math, but not having maple I need testers on consumer linux distros and especially Mac OS X.

@ncalexan ncalexan mannequin changed the title [not ready for review] maple -- the interface is completely broken in Sage-2.10.1 with Maple 11. maple -- the interface is completely broken in Sage-2.10.1 with Maple 11. Apr 1, 2009
@ncalexan ncalexan mannequin added the s: needs review label Apr 1, 2009
@williamstein
Copy link
Contributor Author

comment:9

It hangs forever on using it with Maple 12 on my Mac laptop:

sage: maple('2+3')
[hang forever]

I'll install Maple 12 on my beefy office desktop OS X box (bsd.math.washington.edu), and give you an account.

@williamstein
Copy link
Contributor Author

comment:10

By the way, the code currently in sage-3.4 works fine with Maple 12 on OS X on my laptop. So the patch breaks things for OS X.

@malb
Copy link
Member

malb commented Aug 25, 2009

comment:11

Here is what I currently get with Maple 11:

sage -t --optional "devel/sage-main/sage/interfaces/maple.py"            
**********************************************************************   
File "/usr/local/sage-4.1/devel/sage-main/sage/interfaces/maple.py", line 29:
    sage: maple.eval('ifactor(2005)')                    # optional - maple  
Expected:                                                                    
    '"(5)*"(401)'                                                            
Got:                                                                         
    '``(5)*``(401)'                                                          
**********************************************************************       
File "/usr/local/sage-4.1/devel/sage-main/sage/interfaces/maple.py", line 31:
    sage: maple.ifactor(2005)                            # optional - maple  
Expected:                                                                    
    "(5)*"(401)                                                              
Got:                                                                         
    ``(5)*``(401)                                                            
**********************************************************************       
File "/usr/local/sage-4.1/devel/sage-main/sage/interfaces/maple.py", line 188:
    sage: maple.ifactor(maple.fibonacci(27))     # optional - maple
Expected:
    "(2)*"(17)*"(53)*"(109)
Got:
    ``(2)*``(17)*``(53)*``(109)
**********************************************************************
File "/usr/local/sage-4.1/devel/sage-main/sage/interfaces/maple.py", line 1068:
    sage: print latex(maple(pi - e^3))                   # optional -- requires maple
Expected:
    \pi - \left( {e^{1}} \right) ^{3}
Got:
    \pi-{e^{3}}
**********************************************************************
2 items had failures:
   3 of  28 in __main__.example_0
   1 of   4 in __main__.example_40
***Test Failed*** 4 failures.
For whitespace errors, see the file /usr/local/sage-4.1/tmp/.doctest_maple.py
         [21.0 s]

@sagetrac-abbot
Copy link
Mannequin

sagetrac-abbot mannequin commented Jun 4, 2011

comment:12

I have tested this patch on Linux/x86_64 (Fedora 14) with sage-4.4.1 and Maple 13, and also Maple 11. It does fix the problem. Test output with Maple 13:

sage -t --optional "devel/sage-main/sage/interfaces/maple.py"
**********************************************************************
File "/opt/sage-4.4.1/devel/sage-main/sage/interfaces/maple.py", line 1013:
    sage: u == t                                   # optional -- requires maple
Expected:
    True
Got:
    False
**********************************************************************
File "/opt/sage-4.4.1/devel/sage-main/sage/interfaces/maple.py", line 1118:
    sage: print latex(maple(pi - e^3))                   # optional -- requires maple
Expected:
    \pi - \left( {e^{1}} \right) ^{3}
Got:
    \pi-{{\rm e}^{3}}
**********************************************************************
2 items had failures:
   1 of  22 in __main__.example_36
   1 of   4 in __main__.example_40
***Test Failed*** 2 failures.
For whitespace errors, see the file /home/shamardin/.sage//tmp/.doctest_maple.py
	 [39.6 s]
 
----------------------------------------------------------------------
The following tests failed:


	sage -t --optional "devel/sage-main/sage/interfaces/maple.py"
Total time for all tests: 39.6 seconds

@robertwb
Copy link
Contributor

comment:13

As of sage 5.5

	sage -t --only-optional=maple devel/sage/sage/symbolic/expression.pyx # 2 doctests failed
	sage -t --only-optional=maple devel/sage/sage/symbolic/integration/integral.py # 2 doctests failed
	sage -t --only-optional=maple devel/sage/sage/calculus/calculus.py # 1 doctests failed
	sage -t --only-optional=maple devel/sage/sage/misc/functional.py # 1 doctests failed
	sage -t --only-optional=maple devel/sage/sage/tests/benchmark.py # 5 doctests failed
	sage -t --only-optional=maple devel/sage/sage/interfaces/maple.py # 123 doctests failed

Related: #13540

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Contributor

jdemeyer commented Jan 1, 2013

Changed keywords from editor_craigcitro to none

@jdemeyer jdemeyer changed the title maple -- the interface is completely broken in Sage-2.10.1 with Maple 11. Maple interface completely broken with Maple 11 Jan 1, 2013
@sagetrac-migeruhito
Copy link
Mannequin

sagetrac-migeruhito mannequin commented Feb 16, 2013

comment:15

See Ticket #12295

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@mezzarobba
Copy link
Member

comment:18

close in favor of #12295, which is more up to date?

@mezzarobba mezzarobba removed this from the sage-6.2 milestone Mar 15, 2014
@rwst
Copy link
Contributor

rwst commented Mar 24, 2014

comment:19

Yes, since there is apparently a fix attached for sage-5.9, while the last comment here concerns 5.5.

@rwst
Copy link
Contributor

rwst commented Mar 24, 2014

Reviewer: Ralf Stephan

@fchapoton

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants