core.logic

nominal unification misses after-the-fact fd constraints

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Related to http://dev.clojure.org/jira/browse/LOGIC-92, these two snippets both return (nom/tie 'a_0 1) instead of three results for 1, 2, 3.

(run* [q]
  (nom/fresh [a b c]
    (fresh [x y]
      (== (nom/tie b (nom/tie a x)) (nom/tie c q))
      (infd x (interval 1 3)))))

(run* [q]
  (nom/fresh [a b c]
    (fresh [x y]
      (infd y (interval 1 3))
      (== (nom/tie b (nom/tie a x)) (nom/tie c q))
      (== x y))))

Activity

David Nolen made changes -
Field Original Value New Value
Description Related to http://dev.clojure.org/jira/browse/LOGIC-92, these two snippets both return (nom/tie 'a_0 1) instead of three results for 1, 2, 3.

{code}
  (run* [q]
    (nom/fresh [a b c]
      (fresh [x y]
        (== (nom/tie b (nom/tie a x)) (nom/tie c q))
        (infd x (interval 1 3)))))
  (run* [q]
    (nom/fresh [a b c]
      (fresh [x y]
        (infd y (interval 1 3))
        (== (nom/tie b (nom/tie a x)) (nom/tie c q))
        (== x y))))
{code}
Related to http://dev.clojure.org/jira/browse/LOGIC-92, these two snippets both return (nom/tie 'a_0 1) instead of three results for 1, 2, 3.

{code}
(run* [q]
  (nom/fresh [a b c]
    (fresh [x y]
      (== (nom/tie b (nom/tie a x)) (nom/tie c q))
      (infd x (interval 1 3)))))

(run* [q]
  (nom/fresh [a b c]
    (fresh [x y]
      (infd y (interval 1 3))
      (== (nom/tie b (nom/tie a x)) (nom/tie c q))
      (== x y))))
{code}
Nada Amin made changes -
Attachment logic-98.diff [ 11798 ]
Nada Amin made changes -
Attachment logic-98-nominal.diff [ 11802 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: