Details
-
Type:
Defect
-
Status:
Resolved
-
Priority:
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))))
Attachments
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 ] |
logic-98.diff fixes this by forcing all nom-related vars at once.
Do you have any ideas for separating the concern, so that force-ans doesn't need to know about ::nom?