Details
-
Type:
Defect
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Not sure whether we actually want to do anything about this.
When running this snippet,
(run* [q]
(fresh [a b]
(== q [a b])
(!= a q)))
we get the result:
(([_0 _1] :- (!= (_0 [_0 _1]))))
The reified != constraint is arguably spurious, because of the occurs-check.
Even if we instantiate the a:
(run* [q]
(fresh [a b]
(== q [a b])
(!= a q)
(== a 1)))
we get the result:
(([1 _0] :- (!= (1 [1 _0]))))
while there is no way the != constraint can be satisfied.
Thoughts?
logic-100.diff contains a hackish fix: use unify instead of not= to deal with non-ground terms. Also, don't add the constraint if you know that some pairs cannot be unified upfront (this is needed b/c disunify and unify are not consistent wrt occurs-check).