core.logic

predc constraint is not enforced when it could be

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

The predc number constraint fails to be enforced here.

(is (= (run* [q]
           (fresh [x]
             (== q x)
             (predc q number? `number?)
             (== x "foo")))
        ())) ;; false -- actual is ((_0 :- number?))

Inverting the first two goals gives the expected result.

(is (= (run* [q]
           (fresh [x]
             (predc q number? `number?)
             (== q x)
             (== x "foo")))
        ())) ;; OK

Activity

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: