eva icon indicating copy to clipboard operation
eva copied to clipboard

Some `or` conditions fail when they should not

Open tylerwilding-wk opened this issue 5 years ago • 0 comments

Datomic Example:

(d/q '[:find ?A ?B
       :where (or (and [?A :foo ?B] [(pos? ?B)]))]
     [[1 :foo 2]])
#{[1 2]}

Eva Example:

(q '[:find ?A ?B
     :where (or (and [?A :foo ?B] [(pos? ?B)]))]
   [[1 :foo 2]])
EvaException Insufficient bindings: no predicate could be selected.  eva.error/eva-exception (error.clj:121)

The set of required variables in an or clause is the union of the sets of required variables in its subclauses, which cannot be derived interior to the subclause, prior to their required binding.

tylerwilding-wk avatar Jul 12 '19 14:07 tylerwilding-wk