Welcome! Please see the About page for a little more info on how this works.
SWI-Prolog's CLP(FD) module has this functionality http://www.swi-prolog.org/man/clpfd.html