Supersonic FF for Railgun CLP(FD) (Re: Porting Railgun CLP(FD) to SWI-Prolog)

Mild Shock <[email protected]> Wed, 21 Jan 2026 21:27:33 +0100
Newsgroups comp.lang.python
Message-ID <[email protected]>
We recently presented a fast constraint solver
termed Railgun CLP(FD) that modelled attributed
variables simply via ‘$ATTR’/2 compounds. We
already went through an iteration which allowed
(#\=)/2 constraints. In this instalment we
present some further progress. In particular we
intoduce a discount(C) = 1/k heuristic.

We demonstrated an additional scoring of variables
among the same degree to improve the static variable
ordering (SVO). It can give a 100x times speed up
in a magic square example. Putting Dogelog Player
on equal foot with SWI and ECLiPSe, while recent
versions of Scryer and Trealla were still 10x-30x
times slower.

See also:

Supersonic FF for Railgun CLP(FD)
https://qiita.com/j4n_bur53/items/0d1334f1f4c2234f3f47

Mild Shock schrieb:
> 
> We recently presented a fast constraint solver
> termed Railgun CLP(FD) that modelled attributed
> variables simply via ‘$ATTR’/2 compounds and could
> deal with integer dif/2 constraints. In this
> instalment we allow (#\=)2 constraints and demonstrate
> that it can be ported to SWI-Prolog.
> 
> Using polyfill for ‘$SEQ’/2 from Dogelog Player,
> we observed that running Railgun CLP(FD) inside
> SWI-Prolog gives a 2–3x speed-up for the Queens
> example, on both 32-bit and 64-bit. On the other
> hand the price tag for big integer flexibility
> seems to be a factor 35x slow down.
> 
> See also:
> 
> Porting Railgun CLP(FD) to SWI-Prolog
> https://medium.com/2989/e9f2ef4e6878