Opened 8 years ago

Last modified 2 years ago

## #17753 new enhancement

# move pexpect-maxima code to maxima_lib

Reported by: | Ralf Stephan | Owned by: | |
---|---|---|---|

Priority: | major | Milestone: | sage-wishlist |

Component: | interfaces | Keywords: | |

Cc: | Merged in: | ||

Authors: | Reviewers: | ||

Report Upstream: | N/A | Work issues: | |

Branch: | Commit: | ||

Dependencies: | Stopgaps: |

### Description (last modified by )

This metaticket tracks efforts to remove the usage of pexpect for calling maxima, either by using `maxima_lib`

or replacing it altogether. Code that is dependent on the maxima expect interface is in:

`doc/`

and other places using`maxima.eval()`

(see #30071):`calculus/desolvers.py`

`desolve_*()`

:`functions/piecewise.py`

`piecewise.convolution()`

:`matrix/matrix1.pyx`

`Matrix._maxima_init_()`

:`matrix/matrix_symbolic_dense.pyx`

`Matrix_symbolic_dense.exp()`

:`structure/sage_object.pyx`

`SageObject._maxima_()`

,`_maxima_init_()`

:`symbolic/assumptions.py`

`GenericDeclaration.assume()`

:`symbolic/expression.pyx`

`Ex.assume()`

,`forget()`

,`assume_str()`

,`assert()`

,`expand_trig()`

,`reduce_trig()`

,`maxima_methods()`

,`rectform()`

,`simplify()`

,`simplify_real()`

,`simplify_rational()`

(#21335),`simplify_log()`

,`expand_log()`

,`factor()`

(#23835),`solve()`

,`sum()`

: *`symbolic/maxima_wrapper.py`

:`calculus/calculus.py`

`symbolic_expression_from_maxima_string()`

called by`factor()`

(#23835) and indirectly by`solve()`

Already done:

: (both #20455)`Expression.coefficients()`

and`poly()`

(#22325):`functions/orthogonal_polys.py`

`hermite()`

(#20297),`jacobi_P()`

(#22326),`laguerre()`

(#17151),`legendre_P/Q()`

(#16813),`ultraspherical()`

(#20428):`functions/special.py`

`SphericalHarmonic._eval_()`

(#20939):`combinat/combinat.py`

`euler_number()`

(see #17770 and #20763):`geometry/lattice_polytope.py`

`positive_integer_relations()`

#20766

This can be considered part of the metaticket #16688. See also http://trac.sagemath.org/wiki/symbolics/maxima

### Change History (21)

### comment:1 Changed 8 years ago by

Description: | modified (diff) |
---|

### comment:2 Changed 8 years ago by

Milestone: | sage-6.5 → sage-wishlist |
---|

### comment:3 Changed 7 years ago by

Description: | modified (diff) |
---|

### comment:4 Changed 7 years ago by

Description: | modified (diff) |
---|

### comment:5 Changed 7 years ago by

Description: | modified (diff) |
---|

### comment:6 Changed 6 years ago by

Description: | modified (diff) |
---|

### comment:7 Changed 6 years ago by

Description: | modified (diff) |
---|

### comment:8 Changed 6 years ago by

Description: | modified (diff) |
---|

### comment:9 Changed 6 years ago by

Description: | modified (diff) |
---|

### comment:10 Changed 6 years ago by

Description: | modified (diff) |
---|

### comment:11 Changed 6 years ago by

Description: | modified (diff) |
---|

### comment:12 Changed 6 years ago by

Description: | modified (diff) |
---|

### comment:13 Changed 6 years ago by

Description: | modified (diff) |
---|

### comment:14 Changed 5 years ago by

Description: | modified (diff) |
---|

### comment:15 Changed 5 years ago by

Description: | modified (diff) |
---|

### comment:16 Changed 5 years ago by

Description: | modified (diff) |
---|

### comment:17 Changed 5 years ago by

### comment:18 Changed 5 years ago by

As far as I recall, I named that code optional that I thought is only executed when certain non-default keywords are given. Looking at the three items,

`symbolic_expression_from_maxima_string`

is only used in doctests of`calculs.py`

but is absolutely imported by`ex.factor()`

and in`relation.py:string_to_list_of_solutions()`

which is used by`solve()`

so the assessment was wrong`stirling_number2`

in`combinat/combinat.py`

: default is not Maxima, okay`integration/*`

: certainly Maxima is called, so it's wrong

Thanks for asking, I'm changing it.

### comment:19 Changed 5 years ago by

Description: | modified (diff) |
---|

### comment:20 Changed 2 years ago by

there are places where `maxima.eval`

instead of considerably faster `maxima_calculus.eval`

is used for no good reason, e.g. in `src/doc`

, see #30071.

### comment:21 Changed 2 years ago by

Description: | modified (diff) |
---|

**Note:**See TracTickets for help on using tickets.

I am confused about the meaning of Absolute vs Optional dependencies mentioned on the wiki, could you elaborate?