Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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

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

Avoid GNU Prolog. It sucks.



Thanks 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?


Hm, maybe this could be combined with reasonml/ocaml js target...

https://github.com/Emmanuel-PLF/facile




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: