sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

move pexpect-maxima code to maxima_lib #17753

Open rwst opened 9 years ago

rwst commented 9 years ago

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:

Already done:

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

Component: interfaces

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

rwst commented 9 years ago

Description changed:

--- 
+++ 
@@ -3,7 +3,7 @@
 * *`calculus/desolvers.py`*: `desolve_*()`
 * *`combinat/combinat.py`*: `euler_number()`
 * *`geometry/lattice_polytope.py`*: `positive_integer_relations()`
-* *`functions/orthogonal_polys.py`*: `hermite()`, `jacobi_P()`, `laguerre()` (obsolete with #16813), `legendre_P/Q()` (obsolete with #17151), ultraspherical()
+* *`functions/orthogonal_polys.py`*: `hermite()`, `jacobi_P()`, `laguerre()` (obsolete with #16813), `legendre_P/Q()` (obsolete with #17151), `ultraspherical()`
 * *`functions/piecewise.py`*: `Piecewise.convolution()`
 * *`matrix/matrix1.pyx`*: `Matrix._maxima_init_()`
 * *`matrix/matrix_symbolic_dense.pyx`*: `Matrix_symbolic_dense.exp()` 
@@ -12,4 +12,4 @@
 * *`symbolic/expression.pyx`*: `Ex.assume()`, `forget()`, `assume_str()`, `assert()`, `expand_trig()`, `reduce_trig()`, `coefficients()`, `poly()`, `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()`, `simplify_log()`, `expand_log()`, `factor()`, `solve()`, `sum()`
 * *`symbolic/maxima_wrapper.py`*: *

-This can be considered part of the metaticket #16688.
+This can be considered part of the metaticket #16688. See also http://trac.sagemath.org/wiki/symbolics/maxima
rwst commented 8 years ago

Description changed:

--- 
+++ 
@@ -3,13 +3,13 @@
 * *`calculus/desolvers.py`*: `desolve_*()`
 * *`combinat/combinat.py`*: `euler_number()`
 * *`geometry/lattice_polytope.py`*: `positive_integer_relations()`
-* *`functions/orthogonal_polys.py`*: `hermite()`, `jacobi_P()`, `laguerre()` (obsolete with #16813), `legendre_P/Q()` (obsolete with #17151), `ultraspherical()`
-* *`functions/piecewise.py`*: `Piecewise.convolution()`
+* *`functions/orthogonal_polys.py`*: `hermite()` (#20297), `jacobi_P()`, `laguerre()` (#16813), `legendre_P/Q()` (#17151), `ultraspherical()` (#20428)
+* *`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()`, `coefficients()`, `poly()`, `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()`, `simplify_log()`, `expand_log()`, `factor()`, `solve()`, `sum()`
+* *`symbolic/expression.pyx`*: `Ex.assume()`, `forget()`, `assume_str()`, `assert()`, `expand_trig()`, `reduce_trig()`, `coefficients()` (#20455), `poly()`, `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()`, `simplify_log()`, `expand_log()`, `factor()`, `solve()`, `sum()`
 * *`symbolic/maxima_wrapper.py`*: *

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

Description changed:

--- 
+++ 
@@ -1,7 +1,7 @@
 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:

 * *`calculus/desolvers.py`*: `desolve_*()`
-* *`combinat/combinat.py`*: `euler_number()`
+* *`combinat/combinat.py`*: `euler_number()` (see #17770 and #20763)
 * *`geometry/lattice_polytope.py`*: `positive_integer_relations()`
 * *`functions/orthogonal_polys.py`*: `hermite()` (#20297), `jacobi_P()`, `laguerre()` (#16813), `legendre_P/Q()` (#17151), `ultraspherical()` (#20428)
 * *`functions/piecewise.py`*: `piecewise.convolution()`
fchapoton commented 8 years ago

Description changed:

--- 
+++ 
@@ -2,7 +2,7 @@

 * *`calculus/desolvers.py`*: `desolve_*()`
 * *`combinat/combinat.py`*: `euler_number()` (see #17770 and #20763)
-* *`geometry/lattice_polytope.py`*: `positive_integer_relations()`
+* *`geometry/lattice_polytope.py`*: `positive_integer_relations()` #20766
 * *`functions/orthogonal_polys.py`*: `hermite()` (#20297), `jacobi_P()`, `laguerre()` (#16813), `legendre_P/Q()` (#17151), `ultraspherical()` (#20428)
 * *`functions/piecewise.py`*: `piecewise.convolution()`
 * *`matrix/matrix1.pyx`*: `Matrix._maxima_init_()`
rwst commented 8 years ago

Description changed:

--- 
+++ 
@@ -3,7 +3,7 @@
 * *`calculus/desolvers.py`*: `desolve_*()`
 * *`combinat/combinat.py`*: `euler_number()` (see #17770 and #20763)
 * *`geometry/lattice_polytope.py`*: `positive_integer_relations()` #20766
-* *`functions/orthogonal_polys.py`*: `hermite()` (#20297), `jacobi_P()`, `laguerre()` (#16813), `legendre_P/Q()` (#17151), `ultraspherical()` (#20428)
+* *`functions/orthogonal_polys.py`*: `hermite()` (#20297), `jacobi_P()`, `laguerre()` (#17151), `legendre_P/Q()` (#16813), `ultraspherical()` (#20428)
 * *`functions/piecewise.py`*: `piecewise.convolution()`
 * *`matrix/matrix1.pyx`*: `Matrix._maxima_init_()`
 * *`matrix/matrix_symbolic_dense.pyx`*: `Matrix_symbolic_dense.exp()` 
rwst commented 8 years ago

Description changed:

--- 
+++ 
@@ -9,7 +9,7 @@
 * *`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()`, `coefficients()` (#20455), `poly()`, `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()`, `simplify_log()`, `expand_log()`, `factor()`, `solve()`, `sum()`
+* *`symbolic/expression.pyx`*: `Ex.assume()`, `forget()`, `assume_str()`, `assert()`, `expand_trig()`, `reduce_trig()`, `coefficients()` and `poly()` (both #20455), `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()`, `simplify_log()`, `expand_log()`, `factor()`, `solve()`, `sum()`
 * *`symbolic/maxima_wrapper.py`*: *

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

Description changed:

--- 
+++ 
@@ -5,6 +5,7 @@
 * *`geometry/lattice_polytope.py`*: `positive_integer_relations()` #20766
 * *`functions/orthogonal_polys.py`*: `hermite()` (#20297), `jacobi_P()`, `laguerre()` (#17151), `legendre_P/Q()` (#16813), `ultraspherical()` (#20428)
 * *`functions/piecewise.py`*: `piecewise.convolution()`
+* *`functions/special.py`*: `SphericalHarmonic._eval_()` (#20939)
 * *`matrix/matrix1.pyx`*: `Matrix._maxima_init_()`
 * *`matrix/matrix_symbolic_dense.pyx`*: `Matrix_symbolic_dense.exp()` 
 * *`structure/sage_object.pyx`*: `SageObject._maxima_()`, `_maxima_init_()`
rwst commented 8 years ago

Description changed:

--- 
+++ 
@@ -1,8 +1,6 @@
 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:

 * *`calculus/desolvers.py`*: `desolve_*()`
-* *`combinat/combinat.py`*: `euler_number()` (see #17770 and #20763)
-* *`geometry/lattice_polytope.py`*: `positive_integer_relations()` #20766
 * *`functions/orthogonal_polys.py`*: `hermite()` (#20297), `jacobi_P()`, `laguerre()` (#17151), `legendre_P/Q()` (#16813), `ultraspherical()` (#20428)
 * *`functions/piecewise.py`*: `piecewise.convolution()`
 * *`functions/special.py`*: `SphericalHarmonic._eval_()` (#20939)
@@ -13,4 +11,8 @@
 * *`symbolic/expression.pyx`*: `Ex.assume()`, `forget()`, `assume_str()`, `assert()`, `expand_trig()`, `reduce_trig()`, `coefficients()` and `poly()` (both #20455), `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()`, `simplify_log()`, `expand_log()`, `factor()`, `solve()`, `sum()`
 * *`symbolic/maxima_wrapper.py`*: *

+Already done:
+* *`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
rwst commented 8 years ago

Description changed:

--- 
+++ 
@@ -8,7 +8,7 @@
 * *`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()`, `coefficients()` and `poly()` (both #20455), `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()`, `simplify_log()`, `expand_log()`, `factor()`, `solve()`, `sum()`
+* *`symbolic/expression.pyx`*: `Ex.assume()`, `forget()`, `assume_str()`, `assert()`, `expand_trig()`, `reduce_trig()`, `coefficients()` and `poly()` (both #20455), `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()` (#21335), `simplify_log()`, `expand_log()`, `factor()`, `solve()`, `sum()`
 * *`symbolic/maxima_wrapper.py`*: *

 Already done:
rwst commented 7 years ago

Description changed:

--- 
+++ 
@@ -1,9 +1,8 @@
 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:

 * *`calculus/desolvers.py`*: `desolve_*()`
-* *`functions/orthogonal_polys.py`*: `hermite()` (#20297), `jacobi_P()`, `laguerre()` (#17151), `legendre_P/Q()` (#16813), `ultraspherical()` (#20428)
+* *`functions/orthogonal_polys.py`* (#22325): `hermite()` (#20297), `jacobi_P()`, `laguerre()` (#17151), `legendre_P/Q()` (#16813), `ultraspherical()` (#20428)
 * *`functions/piecewise.py`*: `piecewise.convolution()`
-* *`functions/special.py`*: `SphericalHarmonic._eval_()` (#20939)
 * *`matrix/matrix1.pyx`*: `Matrix._maxima_init_()`
 * *`matrix/matrix_symbolic_dense.pyx`*: `Matrix_symbolic_dense.exp()` 
 * *`structure/sage_object.pyx`*: `SageObject._maxima_()`, `_maxima_init_()`
@@ -12,6 +11,7 @@
 * *`symbolic/maxima_wrapper.py`*: *

 Already done:
+* *`functions/special.py`*: `SphericalHarmonic._eval_()` (#20939)
 * *`combinat/combinat.py`*: `euler_number()` (see #17770 and #20763)
 * *`geometry/lattice_polytope.py`*: `positive_integer_relations()` #20766
rwst commented 7 years ago

Description changed:

--- 
+++ 
@@ -1,7 +1,7 @@
 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:

 * *`calculus/desolvers.py`*: `desolve_*()`
-* *`functions/orthogonal_polys.py`* (#22325): `hermite()` (#20297), `jacobi_P()`, `laguerre()` (#17151), `legendre_P/Q()` (#16813), `ultraspherical()` (#20428)
+* *`functions/orthogonal_polys.py`* (#22325): `hermite()` (#20297), `jacobi_P()` (#22326), `laguerre()` (#17151), `legendre_P/Q()` (#16813), `ultraspherical()` (#20428)
 * *`functions/piecewise.py`*: `piecewise.convolution()`
 * *`matrix/matrix1.pyx`*: `Matrix._maxima_init_()`
 * *`matrix/matrix_symbolic_dense.pyx`*: `Matrix_symbolic_dense.exp()` 
rwst commented 7 years ago

Description changed:

--- 
+++ 
@@ -1,7 +1,6 @@
 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:

 * *`calculus/desolvers.py`*: `desolve_*()`
-* *`functions/orthogonal_polys.py`* (#22325): `hermite()` (#20297), `jacobi_P()` (#22326), `laguerre()` (#17151), `legendre_P/Q()` (#16813), `ultraspherical()` (#20428)
 * *`functions/piecewise.py`*: `piecewise.convolution()`
 * *`matrix/matrix1.pyx`*: `Matrix._maxima_init_()`
 * *`matrix/matrix_symbolic_dense.pyx`*: `Matrix_symbolic_dense.exp()` 
@@ -11,6 +10,7 @@
 * *`symbolic/maxima_wrapper.py`*: *

 Already done:
+* *`functions/orthogonal_polys.py`* (#22325): `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
rwst commented 7 years ago

Description changed:

--- 
+++ 
@@ -6,7 +6,7 @@
 * *`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()`, `coefficients()` and `poly()` (both #20455), `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()` (#21335), `simplify_log()`, `expand_log()`, `factor()`, `solve()`, `sum()`
+* *`symbolic/expression.pyx`*: `Ex.assume()`, `forget()`, `assume_str()`, `assert()`, `expand_trig()`, `reduce_trig()`, `coefficients()` and `poly()` (both #20455), `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()` (#21335), `simplify_log()`, `expand_log()`, `factor() (#23835)`, `solve()`, `sum()`
 * *`symbolic/maxima_wrapper.py`*: *

 Already done:
rwst commented 6 years ago

Description changed:

--- 
+++ 
@@ -6,10 +6,11 @@
 * *`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()`, `coefficients()` and `poly()` (both #20455), `maxima_methods()`, `rectform()`, `simplify()`, `simplify_real()`, `simplify_rational()` (#21335), `simplify_log()`, `expand_log()`, `factor() (#23835)`, `solve()`, `sum()`
+* *`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`*: *

 Already done:
+* *`Expression.coefficients()` and `poly()`*: (both #20455) 
 * *`functions/orthogonal_polys.py`* (#22325): `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)
rwst commented 6 years ago

Description changed:

--- 
+++ 
@@ -6,7 +6,7 @@
 * *`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/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`*: *

 Already done:
dimpase commented 6 years ago
comment:17

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

rwst commented 6 years ago
comment:18

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,

Thanks for asking, I'm changing it.

rwst commented 6 years ago

Description changed:

--- 
+++ 
@@ -8,6 +8,7 @@
 * *`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:
 * *`Expression.coefficients()` and `poly()`*: (both #20455) 
dimpase commented 4 years ago
comment:20

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.

dimpase commented 4 years ago

Description changed:

--- 
+++ 
@@ -1,5 +1,6 @@
 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_()`