Uploaded image for project: 'core.logic'
  1. LOGIC-117

one-shot constraints with multiple rands may run more than once

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None

      Description

      Here are two examples using fixc:

      (run* [q]
        (fresh [x y]
          (fixc [x y]
            (fn [[x y] a _] (!= x 1))
            (fn [[x y] a] (= (walk a x) (walk a y)))
            '...)
          (== x y)))
      
      (run* [q]
        (fresh [x y c d]
          (fixc [x y]
            (fn [[x y] a _] (!= x y))
            (fn [[x y] a] (or (not (lvar? (walk a x))) (not (lvar? (walk a y)))))
            '...)
          (== [x y] [[c] [d]])))
      

      The constraint != is reified twice in each example, showing that the fixc constraint indeed ran twice.

        Attachments

          Activity

            People

            • Assignee:
              dnolen David Nolen
              Reporter:
              namin Nada Amin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: