Details
-
Type:
Defect
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
(is (= (run* [q]
(nom/fresh [a]
(fresh [x]
(predc x number? `number?)
(== x 1)
(== (nom/tie a [a x]) q))))
[(nom/tie 'a_0 '(a_0 1))]))
(is (= (run* [q]
(nom/fresh [a]
(fresh [x]
(== x 1)
(predc x number? `number?)
(== (nom/tie a [a x]) q))))
[(nom/tie 'a_0 '(a_0 1))])) ;; false b/c of extra :- number? constraint
Activity
David Nolen
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Priority | Major [ 3 ] | Blocker [ 1 ] |
David Nolen
made changes -
| Resolution | Completed [ 1 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
Implementing -force-ans in Tie
clojure.core.logic.IForceAnswerTerm (-force-ans [v x] (force-ans (:body v)))resolves the test above, but not this one:
(is (= (run* [q] (nom/fresh [a b c] (fresh [x y] (== x 1) (predc x number? `number?) (== (nom/tie b (nom/tie a [a x])) (nom/tie c q))))) [(nom/tie 'a_0 '(a_0 1))])) ;; still false b/c of extra :- number? constraintclojure.core.logic.IForceAnswerTerm (-force-ans [v x] (force-ans (:body v)))(is (= (run* [q] (nom/fresh [a b c] (fresh [x y] (== x 1) (predc x number? `number?) (== (nom/tie b (nom/tie a [a x])) (nom/tie c q))))) [(nom/tie 'a_0 '(a_0 1))])) ;; still false b/c of extra :- number? constraint