4 ms·
No, plus/3 is just a simple addition predicate. You should take a look at the CLP(FD) functionality: https://www.swi-prolog.org/man/clpfd.html https://www.swi-p
by kccqzy 7y ago
No, plus/3 is just a simple addition predicate. You should take a look at the CLP(FD) functionality: https://www.swi-prolog.org/man/clpfd.html https://www.swi-prolog.org/man/clpfd.html
You also mentioned CLP(Z) in the parent comment. Not sure if familiar you are with these tools, but here's a nice intro: https://www.metalevel.at/prolog/clpz https://www.metalevel.at/prolog/clpz
Avoid GNU Prolog. It sucks.
- e12e 7y agoThanks for the tip. Ed: the introduction looks like exactly what I need from the prolog side, last I looked at this stuff in prolog, I only found some proof of concept/instructive texts using Peano numbers - which works after a fashion, but is slow and painful. There's nothing analogous for datalog or some other minimal, embeddable logic/predicate system?
- e12e 7y agoHm, maybe this could be combined with reasonml/ocaml js target... https://github.com/Emmanuel-PLF/facile https://github.com/Emmanuel-PLF/facile