[PATCH] 1/2 remove unused 'mapSolve'

9 views
Skip to first unread message

oldk1331

unread,
Apr 8, 2019, 8:22:59 AM4/8/19
to fricas...@googlegroups.com
This patch removes unused function 'mapSolve', which seems to
be a caching mechanism, but it's not working and not used.


https://github.com/oldk1331/fricas/commit/d46e54ca0d0c6b7d2ae23ecaecacfe22cb287594.patch

diff --git a/ChangeLog b/ChangeLog
index fad1db84..160f1cf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-04-08  Qian Yun  <oldk...@gmail.com>
+
+ * src/algebra/solvefor.spad: remove unused 'mapSolve'
+
 2019-02-25  Ralf Hemmecke  <ra...@hemmecke.org>

  * src/algebra/array2.spad: add hashUpdate! to
diff --git a/src/algebra/solvefor.spad b/src/algebra/solvefor.spad
index 9b104564..2bab4943 100644
--- a/src/algebra/solvefor.spad
+++ b/src/algebra/solvefor.spad
@@ -21,10 +21,6 @@
                 ++ solve(u) \undocumented
         particularSolution :  UP -> F
                 ++ particularSolution(u) \undocumented
-        mapSolve :   (UP, F -> F) -> Record(solns : L F,
-                                           maps : L Record(arg : F, res : F))
-                ++ mapSolve(u, f) \undocumented
-
         linear :     UP -> L F
                 ++ linear(u) \undocumented
         quadratic :  UP -> L F
@@ -55,33 +51,9 @@

     PSFdef == add

-        -----------------------------------------------------------------
-        -- Stuff for mapSolve
-        -----------------------------------------------------------------
-        id ==> (IDENTITY$Lisp)
-
-        maplist : List Record(arg : F, res : F) := []
-        mapSolving? : Boolean := false
-        -- map: F -> F := id #1    replaced with line below
-        map : Boolean := false
-
-        mapSolve(p, fn) ==
-            -- map := fn #1   replaced with line below
-            locmap : F -> F := x +-> fn x; map := id locmap
-            mapSolving? := true;  maplist := []
-            slist := solve p
-            mapSolving? := false
-            -- map := id #1   replaced with line below
-            locmap := x +-> id x; map := id locmap
-            [slist, maplist]

         part(s : F) : F ==
-            not mapSolving? => s
-            -- t := map s     replaced with line below
-            t : F := SPADCALL(s, map)$Lisp
-            t = s => s
-            maplist := cons([t, s], maplist)
-            t
+            s

         -----------------------------------------------------------------
         -- Entry points and error handling

Waldek Hebisch

unread,
Apr 13, 2019, 1:12:04 PM4/13/19
to fricas...@googlegroups.com
>
> This patch removes unused function 'mapSolve', which seems to
> be a caching mechanism, but it's not working and not used.
>

Does not look like caching. Since it is not clear what it is
supposed to do removal is in place. Please commit.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages