Hans Moser | 6 Jan 2011 21:07
Picon
Picon

Tried to bind * to NULL value.

I got "WARNING: Tried to bind |V|?s2 to NULL value.  Potentially a PowerLoom bug". I can't see any error in my
code and the negative questio works. 
Thanks.

;;;;
;;;; PowerLoom 4.0.0.beta
;;;;

(in-package "STELLA")

(defmodule "TEST"
  :documentation "Test module"
  :includes ("PL-USER"))

(in-module "TEST")

(set-feature justifications)

(defrelation individual (?x))
(defrelation bounded (?x))
(defrelation unbounded (?x))
(defrelation member (?x ?s))
(defrelation equal (?x ?y))

(assert (forall (?x) (or (set ?x) (individual ?x))))
(assert (forall (?x) (or (not (set ?x)) (not (individual ?x)))))

(assert (forall (?x) (or (bounded ?x) (unbounded ?x))))
(assert (forall (?x) (or (not (bounded ?x)) (not (unbounded ?x)))))

(Continue reading)

Hans Chalupsky | 7 Jan 2011 06:23
Picon
Favicon

Re: Tried to bind * to NULL value.

Yes, looks like a bug.  It's probably getting tripped up somewhere in the
normalization of

> (assert (forall (?s1 ?s2) (=> (and (set ?s1) (set ?s2))
>            (<=> (forall (?x) (<=> (member ?x ?s1) (member ?x ?s2))) 
>               (equal ?s1 ?s2)))))

I'd suggest to rewrite the rule into

(assert (forall (?s1 ?s2)
          (=> (and (set ?s1)
                   (set ?s2)
                   (forall (?x) (<=> (member ?x ?s1) (member ?x ?s2))))
              (equal ?s1 ?s2))))

which will allow you to prove (equal A B) with your KB.  You can add the
reverse direction also if you need that:

(assert (forall (?s1 ?s2)
          (=> (and (set ?s1)
                   (set ?s2)
                   (equal ?s1 ?s2))
              (forall (?x) (<=> (member ?x ?s1) (member ?x ?s2))))))

PowerLoom's normalization of complex nested quantification is a bit shakey at
times, since it doesn't do a standard clause-form transformation.
Fixing that has been on the to-do list for a long time but never
bubbled up to the top.  I'll see whether I can fix this once I get out of the
current hole I'm in.

(Continue reading)


Gmane