Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.prolog > #15978

Dogelog Player: Dining Philosophers with when/2 (Was: Dogelog Player: Heap Pressure for Garbage Collection)

From Mild Shock <janburse@fastmail.fm>
Newsgroups comp.lang.prolog
Subject Dogelog Player: Dining Philosophers with when/2 (Was: Dogelog Player: Heap Pressure for Garbage Collection)
Date 2026-10-23 01:40 +0200
Message-ID <11be6t7$7m71$1@solani.org> (permalink)
References <119dhj3$eoj6$2@solani.org> <11a2a88$tjgk$1@solani.org> <11arkjv$1gf4f$1@solani.org>

Show all headers | View raw


Hi,

Prolog systems with attribute variables saw growing
use cases for constraint logic programming with
implementations such as CLP(FD), CLP(B), etc.. for
example in SWI-Prolog. But one might wonder why
they are also associated with concurrent
logic programming.

The new when/2 primitive allows scheduling goals
on multiple events. By modelling eating forks via
lazy lists, we could replicated the Dining Philosopher
problem. The lazy lists need to be scheduled by an
additional program and we can show that such a
scheduler can run forever.

Bye

See also:

Dogelog Player: Dining Philosophers with when/2
https://medium.com/2989/bc3103c2d544

Mild Shock schrieb:
> Hi,
> 
> Dogelog Player is a Prolog system for the
> JavaScript, Python and Java targets. It is mostly
> written in 100% Prolog. Our garbage collector
> already used GC frequency autotuning via user_time.
> We added a GC generation choice autotuning
> feature using user_memory.
> 
> The heuristic is to use 75% of max_memory as
> a limit for user_memory to trigger an emergency
> major mark & sweep. The Dogelog Player can now
> run loop/1 indefinitely. Less welcome is the
> performance drop from 30 to 10 MLips. SWI-Prolog
> does not show the same degradation.
> 
> Bye
> 
> See also:
> 
> Dogelog Player: Heap Pressure for Garbage Collection
> https://medium.com/2989/5791ef8834d5
> 
> Mild Shock schrieb:
>> Hi,
>>
>> In the following we show that P(purity) has
>> currently almost zero probability, i.e that a
>> Prolog system will provide the first pillar of
>> purity, i.e. the dif/2 constraint. Even if a
>> Prolog system can deal with a large number of
>> dif/2 constraints, it might still fail
>> the reclamation test.
>>
>> Testing Ulrich Neumerkels maplist(dif) problem
>> with a time limit of 1000 ms, we found Trealla
>> Prolog, EyeProlog and Scryer Prolog only
>> approached N=1000. While SWI-Prolog and Dogelog
>> Player climbed above N=1000000. Further a garbage
>> collection test was only survived by
>> Dogelog Player.
>>
>> Bye
>>
>> See also:
>>
>> The implementation of dif/2 with Open Trees
>> https://medium.com/2989/6e2914596a0f
>>
>> Mild Shock schrieb:
>>> Dear All,
>>>
>>> We are happy to announce a new
>>> edition of the Dogelog Player:
>>>
>>> - Ehanced common:
>>> Triggered by SWI-Prologs new built-ins,
>>> we did a revision of library(cyclic) now
>>> exposing term_minimal/2 and term_decompose/2.
>>> Turns out we could also speed-up distinct/1
>>> and aggregate/3, by using term_minimal/2
>>> alone in the deduplication phase. And
>>> then for aggregate/3 deploying a Schwartzian
>>> Transform with term_decompose/2 in
>>> the sorting phase.
>>>
>>> - Enhanced top-level:
>>> We also did a revision of the top-level.
>>> For example answer substitutions are now
>>> shown more compact, so that a query X = f(A,Y),
>>> Y = f(B,X) can keep its shape. Further
>>> the debugger now uses the visibility rules
>>> of listing/[0,1]. Even overriding the
>>> provenance of goals arguments and only
>>> prompting in case they branch back
>>> into user clauses.
>>>
>>> - New undo/1:
>>> Realizing the analogue to our recent rogue
>>> '$CUT'/1 for cleanup goals, this time not
>>> scanning the choice points but the variable
>>> trail to find undo goals, we could arrive
>>> at a undo/1. Because of atomicity concerns,
>>> its not directly exposed, and subsequently
>>> the user facing API has now new set_arg/3
>>> and setup_undo/2 only.
>>>
>>> Have Fun!
>>>
>>> Jan Burse, September 28, 2026, https://www.herbrand.ai/
>>
> 

Back to comp.lang.prolog | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

ANN: Dogelog Player 2.3.2 (Schwartzian Transform) Mild Shock <janburse@fastmail.fm> - 2026-09-28 13:04 +0200
  The implementation of dif/2 with Open Trees (Was: ANN: Dogelog Player 2.3.2 (Schwartzian Transform)) Mild Shock <janburse@fastmail.fm> - 2026-10-06 10:07 +0200
    Dogelog Player: Heap Pressure for Garbage Collection (Was: The implementation of dif/2 with Open Trees) Mild Shock <janburse@fastmail.fm> - 2026-10-16 00:37 +0200
      Dogelog Player: Dining Philosophers with when/2 (Was: Dogelog Player: Heap Pressure for Garbage Collection) Mild Shock <janburse@fastmail.fm> - 2026-10-23 01:40 +0200

csiph-web