Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 23 |
Nodes: | 6 (0 / 6) |
Uptime: | 50:05:11 |
Calls: | 583 |
Files: | 1,138 |
Messages: | 111,306 |
I like your vibe, clearing the mind of
everything existing has a touch of a mystic
human being living an eremitic solitary
vocation on a far out mountain top.
**cycle_detection.rs**Use the pointer reversal technique of the Deutsch-Schorr-
Hi,
Assume that we live in a world where we
have excess memory. So we can afford stacks!
And then make the crucial observation,
we can use the stack of the Prolog engine,
no need to create an artificial stack in C,
or use the native stack of C.
I guess SWI-Prolog has already groked the
first we can "afford stacks". But did anybody
already grok the "100% Prolog" idea?
Well we are not yet there 100% Prolog
has still an overhead. Here is a little
test acyclic_term/2:
/* SWI-Prolog 9.3.26, C Stacks and/or Agendas */
?- time((between(1,30,_), acyclic2, fail; true)).
% 330,150 inferences, 0.016 CPU in 0.023 seconds
(69% CPU, 21129600 Lips)
true.
/* Trealla Prolog 2.79.6, ?? */
?- time((between(1,30,_), acyclic2, fail; true)).
% Time elapsed 0.063s, 643413 Inferences, 10.166 MLips
-a-a true.
/* Dogelog Player 1.3.5, 100% Prolog */
?- time((between(1,30,_), acyclic2, fail; true)).
% Zeit 115 ms, GC 0 ms, Lips 11803904, Uhr 28.07.2025 10:03
true.
/* Scryer Prolog 0.9.4-417, Deutsch-Schorr-Waite-a */
?- time((between(1,30,_), acyclic2, fail; true)).
% CPU time: 0.130s, 626_829 inferences
true.
Bye