Re: Porting Rubi

David Scherfgen via Maxima-discuss <[email protected]> Fri, 17 Jul 2026 06:40:06 +0200
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <CAMTHLKgehtMAeQcJFo_C2rrHO-h=tcyqqERKwhpvSD0pK3zoeg@mail.gmail.com>
--===============2281700451425769284==
Content-Type: multipart/alternative; boundary="00000000000036b2b60656c727a3"

--00000000000036b2b60656c727a3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

This should also work with cooperative multi-threading. I have done
something similar for symbolic integration, basically exploring a graph
where each node represents an expression, and edges represent
transformations (change of variable (substitution), simplifications,
rewrites, ...). Do a breadth-first-search, and you'll eventually find the
solution if it is reachable, no need for multi-threading.

Henry Baker <[email protected]> schrieb am Fr., 17. Juli 2026, 05:11:

> This appears to be a poor man's nondeterminism a la Prolog.
>
> The arms which never terminate should be gc'd; if two arms produce
> different results, that's OK -- isn't that part of the definition of
> nondeterminism ?
>
>
> -----Original Message-----
> From: Raymond Toy <[email protected]>
> Sent: Jul 16, 2026 7:17 PM
> To: <[email protected]>
> Subject: Re: [Maxima-discuss] Porting Rubi
>
>
> On 7/16/26 2:57 PM, Dan Stanger wrote:
>
> I had a discussion with Rocky in NYC who works on the Mathics Rubi code,
> and he pointed out that Rubi starts multiple pattern matching threads and
> when one of them finishes by matching, the others are terminated. In whic=
h
> lisps is this implementable ?
>
> Presumably sbcl. Maybe ccl and ecl?
>
> So the first one to finish is considered the right answer? Seems kinda
> odd. It seems that for some integrals you can get different results
> depending on which finishes first? Presumably they=E2=80=99re equivalent?
>
> I certainly wouldn=E2=80=99t want answers that could vary by chance.
>
> Isn=E2=80=99t this just an optimization so it doesn=E2=80=99t take a long=
 time to find a
> pattern that matches?
> &#8203;
> _______________________________________________
> Maxima-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/maxima-discuss
>

--00000000000036b2b60656c727a3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">This should also work with cooperative multi-threading. I=
 have done something similar for symbolic integration, basically exploring =
a graph where each node represents an expression, and edges represent trans=
formations (change of variable (substitution), simplifications, rewrites, .=
..). Do a breadth-first-search, and you&#39;ll eventually find the solution=
 if it is reachable, no need for multi-threading.</div><br><div class=3D"gm=
ail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">Henr=
y Baker &lt;<a href=3D"mailto:[email protected]">[email protected]</a=
>&gt; schrieb am Fr., 17. Juli 2026, 05:11:<br></div><blockquote class=3D"g=
mail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204=
,204,204);padding-left:1ex"><div style=3D"color:rgb(0,0,0);font-family:&quo=
t;Courier New&quot;,Courier,monospace;font-size:10pt"><p style=3D"line-heig=
ht:1">This appears to be a poor man&#39;s nondeterminism a la Prolog.</p><p=
 style=3D"line-height:1">The arms which never terminate should be gc&#39;d;=
 if two arms produce different results, that&#39;s OK -- isn&#39;t that par=
t of the definition of nondeterminism ?</p><p style=3D"line-height:1"></p><=
br></div><div style=3D"border-left:1px solid rgb(170,170,170);box-sizing:bo=
rder-box;padding:10px 0px 10px 15px;margin:0px"><p style=3D"line-height:1">=
-----Original Message-----<br>From: Raymond Toy &lt;<a href=3D"mailto:toy.r=
[email protected]" target=3D"_blank" rel=3D"noreferrer">[email protected]=
m</a>&gt;<br>Sent: Jul 16, 2026 7:17 PM<br>To: &lt;<a href=3D"mailto:maxima=
[email protected]" target=3D"_blank" rel=3D"noreferrer">maxima=
[email protected]</a>&gt;<br>Subject: Re: [Maxima-discuss] Por=
ting Rubi</p><p style=3D"margin:0px;padding:0px;line-height:1.5"><br></p>

 =20

   =20
   =20
   =20
 =20
 =20
    <div>
      <p style=3D"margin-bottom:19.2px;margin-top:0px;line-height:1">On 7/1=
6/26 2:57
        PM, Dan Stanger wrote:<br>
      </p>
      <blockquote type=3D"cite" style=3D"border-color:rgb(119,119,119) rgb(=
119,119,119) rgb(119,119,119) rgb(114,159,207);border-left-width:2px;border=
-left-style:solid;color:rgb(119,119,119);column-rule-color:rgb(119,119,119)=
;margin:19.2px 0px;outline-color:rgb(119,119,119);padding-left:16px;padding=
-right:16px;quotes:none;text-decoration-color:rgb(119,119,119);text-emphasi=
s-color:rgb(119,119,119)">
        <div dir=3D"auto">I had a discussion with Rocky in NYC who works
          on the Mathics Rubi code, and he pointed out that Rubi starts
          multiple pattern matching threads and when one of them
          finishes by matching, the others are terminated. In which
          lisps is this implementable ?</div>
      </blockquote>
      Presumably sbcl. Maybe ccl and ecl?
      <p style=3D"margin-bottom:19.2px;margin-top:0px;line-height:1">So the=
 first
        one to finish is considered the right answer? Seems kinda odd.
        It seems that for some integrals you can get different results
        depending on which finishes first? Presumably they=E2=80=99re
        equivalent?</p>
      <p style=3D"margin-bottom:19.2px;margin-top:0px;line-height:1">I cert=
ainly
        wouldn=E2=80=99t want answers that could vary by chance.</p>
      <p style=3D"margin-bottom:19.2px;margin-top:0px;line-height:1">Isn=E2=
=80=99t this just
        an optimization so it doesn=E2=80=99t take a long time to find a pa=
ttern
        that matches?</p>
    </div>
    <div style=3D"height:0px;width:0px;max-height:0px;max-width:0px;overflo=
w:hidden;font-size:0px;padding:0px;margin:0px" aria-hidden=3D"true" title=
=3D"MDH:PGJyPjxicj48ZGl2IGNsYXNzPSJtb3otY2l0ZS1wcmVmaXgiPk9uIDcvMTYvMjYgMjo=
1NyBQTSwgRGFuIFN0YW5nZXIgd3JvdGU6PGJyPjwvZGl2PjxibG9ja3F1b3RlIHR5cGU9ImNpdG=
UiIGNpdGU9Im1pZDpDQUZ5aHRUNWhCd0N3NVhPZGVocGozdzVySzBMK2FVcE4zMkI4VjMrPWFOe=
jVMaTBMUXdAbWFpbC5nbWFpbC5jb20iPgo8bWV0YSBodHRwLWVxdWl2PSJjb250ZW50LXR5cGUi=
IGNvbnRlbnQ9InRleHQvaHRtbDsgIj48ZGl2IGRpcj0iYXV0byI+SSBoYWQgYSBkaXNjdXNzaW9=
uIHdpdGggUm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=
XRlOyB6LWluZGV4OiAxMDAwOyIgY29udGVudGVkaXRhYmxlPSJmYWxzZSIgcG9wb3Zlcj0iYXV0=
byI+PC91bD4=3D">&amp;#8203;</div>
 =20

</div>_______________________________________________<br>
Maxima-discuss mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank" r=
el=3D"noreferrer">[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/maxima-discuss" rel=
=3D"noreferrer noreferrer" target=3D"_blank">https://lists.sourceforge.net/=
lists/listinfo/maxima-discuss</a><br>
</blockquote></div>

--00000000000036b2b60656c727a3--


--===============2281700451425769284==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============2281700451425769284==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss

--===============2281700451425769284==--