We're updating the issue view to help you get more done. 

Bug in finite domains (+fd, infd)

Description

When running the code:

(run* [q]
(fresh [a b c d]
(infd a b c d (domain 1 3 4 5))
(+fd b 1 a)
(+fd c 1 b)
(+fd d 1 c)
(== q [a b c d])))

I get the ouput:

([5 4 3 1])

But I would expect:

()

Because [5 4 3 1] is no sequence where the next element is always one number higher than the one before.

It seems to me like +fd behaves as it would take the next element in the domain, instead of taking the next higher number (I hope I didn't misunderstand +fd or infd).

Environment

Clojure 1.4, core.logic 0.8-alpha3

Status

Assignee

David Nolen

Reporter

import

Approval

None

Patch

None

Priority

Major