Re: Ulrich Neumerkel is like Ozzy Osbourne

Liste des GroupesRevenir à cl prolog 
Sujet : Re: Ulrich Neumerkel is like Ozzy Osbourne
De : janburse (at) *nospam* fastmail.fm (Mild Shock)
Groupes : comp.lang.prolog
Date : 05. Dec 2024, 11:33:31
Autres entêtes
Message-ID : <virvig$raf2$1@solani.org>
References : 1
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.19
Hi,
This test case is also extremly cringe.
In our Prolog system it conflicts with another
optimization, that is in place to reduce the
length of instantiation chains.
run4 :- run(_).
run(X) :- f(X).
run(X) :- X == [].
Our Prolog system doesn't create a variable
at all for the first clause of run. It speculates
that return value variables are passed around and
thus resulting in no extra instantiation chains.
So it passes the anonymous variable from run4
to the call of f/1. But since the anonymous variable
is from the run(_) call site, and since there is
a choice point. The anonymous variable is always
reachable never carbage collected, similarly chains
_=[f,..,f|T] will never get garbage collected.
In as far the test case fails after a while with
memory overflow.
Bye
Mild Shock schrieb:
Hi,
 Ulrich Neumerkel is like Ozzy Osbourne.
He is making me paranoid. Especially this
F.U.D. here stole one week of my life.
 Precise Garbage Collection in Prolog
https://www.swi-prolog.org/download/publications/lifegc.pdf
 The test cases make no sense at all!
Take this test case run1, similar to run2
and run3:
 run1 :- f(_).
f([f|X]) :- f(X).
 You will never find this in real world.
Perpetual processes usually have a different
pattern of loop state transition.
 Also its virtually impossible to garbage collect
via minor incremental garbage collection. We
might find a chain X=[f,..,f,Y] and collect
 it. But Xn is then colored as old. And instantiation
of an old variable gets on the changed list, and
so a new chain Y=[f,..,f,Z] will not be reclaimed,
 so that the beast can be only reclaimed via
major garbage collection.
 Bye
 P.S.: Maybe there is a chance to solve it
nevertheless via minor garbage collection, but
its very difficult. I had something in
 formerly Jekejeke Prolog via reference counting.
But not sure how to bring it to a Prolog
system without reference counting.
  

Date Sujet#  Auteur
5 Dec 24 * Ulrich Neumerkel is like Ozzy Osbourne7Mild Shock
5 Dec 24 `* Re: Ulrich Neumerkel is like Ozzy Osbourne6Mild Shock
5 Dec 24  `* Re: Ulrich Neumerkel is like Ozzy Osbourne5Mild Shock
5 Dec 24   `* Re: Ulrich Neumerkel is like Ozzy Osbourne4Mild Shock
25 May08:46    `* Prolog Development à la Sigmund Freud (Was: Ulrich Neumerkel is like Ozzy Osbourne)3Mild Shock
25 May08:57     `* variable ordering guarantees in term_singletons/2 (Was: Prolog Development à la Sigmund Freud)2Mild Shock
25 May09:18      `- My stupid Dogelog Player falls back to _<number> (Was: variable ordering guarantees in term_singletons/2)1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal