core.logic

Disequality might not eliminate when `(!= (_0 _0))`

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    0.8.10

Description

When a unification constraint and a disequality constraint are applied to the same lvars they might eliminate possibilities.

Unable to find source-code formatter for language: clojure. Available languages are: javascript, sql, xhtml, actionscript, none, html, xml, java
(run 1 [q]
 (fresh [v n]
   (== q v)
   (!= q v)))

;=> ()

However when a separate disequality is interleaved the possibility is not eliminated.

Unable to find source-code formatter for language: clojure. Available languages are: javascript, sql, xhtml, actionscript, none, html, xml, java
(run 1 [q]
  (fresh [v n]
    (== q v)
    (!= q n)
    (!= q v)))
;=> ((_0 :- (!= (_0 _0)) (!= (_0 _1))))

I expected this to also return '().

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: