core.logic

"PMap is non-storable" exception when using featurec with nested feature map.

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
  • Environment:
    core.locic 0.8.3

Description

This works as expected:

(run* [x y]
  (featurec x {:a {:b 1}})
  (== y {:b 1})
  (== x {:a y}))

;; => ([{:a {:b 1}} {:b 1}])

But with the last two goals swapped an exception is thrown:

(run* [x y]
  (featurec x {:a {:b 1}})
  (== x {:a y})
  (== y {:b 1}))

;; =>
Exception clojure.core.logic.PMap@3c6f0bed is non-storable
    clojure.core.logic.LVar (logic.clj:647)
    clojure.core.logic/unify (logic.clj:231)
    clojure.core.logic/unify-with-pmap* (logic.clj:2601)
    clojure.core.logic.PMap (logic.clj:2614)
    clojure.core.logic/unify (logic.clj:232)
    clojure.core.logic/==/fn--2819 (logic.clj:1135)
    clojure.core.logic/composeg/fn--2745 (logic.clj:1029)
    clojure.core.logic/-featurec/reify--3655 (logic.clj:2646)
    clojure.core.logic/composeg/fn--2745 (logic.clj:1029)
    clojure.core.logic/composeg/fn--2745 (logic.clj:1030)
    clojure.core.logic/run-constraint/fn--3431 (logic.clj:2184)
    clojure.core.logic/fix-constraints (logic.clj:2211)

The same exception is thrown when (== y {:b 1}) is left out:

(run* [x y]
  (featurec x {:a {:b 1}})
  (== x {:a y}))

Activity

David Nolen made changes -
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: