Re: A Timeless Confluence [Term Rewriting] (Was: Can we do this with ancestral cuts or something?)

Liste des GroupesRevenir à cl prolog 
Sujet : Re: A Timeless Confluence [Term Rewriting] (Was: Can we do this with ancestral cuts or something?)
De : janburse (at) *nospam* fastmail.fm (Mild Shock)
Groupes : comp.lang.prolog
Date : 09. Dec 2024, 21:00:17
Autres entêtes
Message-ID : <vj7i8f$11g01$2@solani.org>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.19
Ok Confluence does indeed ring a bell. Lets show
Declarative (What) versus Procedural (How) in
@emiruz example, as a rewriting problem.
Lets permit that we write the input as [1,2,a,4,5,
b,c,8,9,10] and then have rewriting rules [a->3,b->6,
c->7,d->8] applied, by this little Declarative (What) code:
step(L,R) :- nth1(K,L,a,H), nth1(K,R,3,H).
step(L,R) :- nth1(K,L,b,H), nth1(K,R,6,H).
step(L,R) :- nth1(K,L,c,H), nth1(K,R,7,H).
step(L,R) :- nth1(K,L,d,H), nth1(K,R,8,H).
find(L,L) :- \+ step(L,_).
find(L,R) :- step(L,H), find(H,R).
Each derivation is a Procedural (How) execution:
?- find([1,2,a,4,5,b,c,8,9,10],X).
X = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
X = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
X = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Etc..
Can we count the number of Hows to solve the What?
?- aggregate_all(count, find([1,2,a,4,5,b,c,8,9,10],X), C).
C = 6.
So there are 6 different Procedures that tell
us which steps to exactly use when, to solve the
Declaratively given problem which leaves open
when to use each step.
Mild Shock schrieb:
A Timeless Confluence
 By the banks of thought where rivers entwine,
Emmy Noether walked through a realm divine.
Her algebra wove the fabric of laws,
While echoes of logic gave her pause.
 There stood Michael Kohlhase, a seeker of form,
Shaping machines through a digital storm.
“Madame,” he began, with respect in his tone,
“Your ideals still guide what we’ve come to own.
 Noetherian rings, your towering art,
Anchor the systems of which I’m a part.
In rewriting paths, your truth remains,
Simplifying chaos, dissolving chains.”
 Emmy smiled, her brilliance aglow,
"Through eras, the seeds of knowledge grow.
Yet tell me, dear traveler, in your machine’s frame,
Do ideals endure, or fade like a flame?”
 Michael replied, “Your vision holds,
In logic’s rewrite, it gently unfolds.
Past meets the present where structures align,
A confluence of thought, eternal, divine.”
 And so they stood, two eras combined,
Bound by the currents of the infinite mind.
 https://en.m.wikipedia.org/wiki/Emmy_Noether
 https://en.m.wikipedia.org/wiki/Michael_Kohlhase
 Julio Di Egidio schrieb:
On 09/12/2024 16:47, Julio Di Egidio wrote:
>
term rewriting also can do the trick and quite more simply so...
>
I take that back, too.  I cannot find a way out of ancestral cuts in the recursive case.  Some term rewriting could rather be useful *in conjunction* with that `scut`, since that as written messes up with the stack trace...  Anyway, that's another story.
>
-Julio
>
 

Date Sujet#  Auteur
9 Dec 24 * Can we do this with ancestral cuts or something?11Julio Di Egidio
9 Dec 24 `* Re: Can we do this with ancestral cuts or something?10Mild Shock
9 Dec 24  +* '$MARK' and '$CUT' (Was: Can we do this with ancestral cuts or something?)2Mild Shock
9 Dec 24  i`- Re: '$MARK' and '$CUT' (Was: Can we do this with ancestral cuts or something?)1Julio Di Egidio
9 Dec 24  `* Re: Can we do this with ancestral cuts or something?7Julio Di Egidio
9 Dec 24   +* Re: Can we do this with ancestral cuts or something?2Julio Di Egidio
9 Dec 24   i`- Re: Can we do this with ancestral cuts or something?1Julio Di Egidio
9 Dec 24   `* Re: Can we do this with ancestral cuts or something?4Julio Di Egidio
9 Dec 24    `* A Timeless Confluence [Term Rewriting] (Was: Can we do this with ancestral cuts or something?)3Mild Shock
9 Dec 24     `* Re: A Timeless Confluence [Term Rewriting] (Was: Can we do this with ancestral cuts or something?)2Mild Shock
9 Dec 24      `- Re: A Timeless Confluence [Term Rewriting] (Was: Can we do this with ancestral cuts or something?)1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal