Re: Tried to bind |V|?x to NULL value.
Thomas Russ <[email protected]> Sat, 2 Aug 2008 20:21:11 -0700
| Newsgroups | gmane.comp.ai.powerloom |
|---|---|
| Message-ID | <[email protected]> |
On Aug 2, 2008, at 1:26 PM, Martin Baldan wrote:
> Hello!
>
> I'm a newbie trying to get a hang of this nice powerloom tool, but
> I've run into a problem. During some simple tests, the bug mentioned
> in the subject appeared, and I don't know what to make of it. Here's a
> transcript of my session, which will explain it better than my own
> words:
OK. The main thing that is going on is that PowerLoom doesn't really
like to do extremely open-ended reasoning, and the rule that you have
formulated is very open ended. It says, essentially, that everything
in the universe is the friend of everything else. That would give a
really large result, and PowerLoom doesn't like to attempt to reason
if things are that open ended.
------------
>
> PL-USER |= (powerloom-information)
>
> |L|"PowerLoom 3.2.0
I would encourage you to use the current PowerLoom snapshot. It does
include a number of bug fixes and is generally just as stable as the
official "stable" release.
> STELLA 3.4.0 [JAVA]
> java.vendor = Sun Microsystems Inc.
> java.version = 1.6.0_06
> os.arch = i386
> os.name = Linux
> os.version = 2.6.25-2-486"
>
> PL-USER |= (defobject alice)
>
> |i|ALICE
>
> PL-USER |= (defobject bob)
>
> |i|BOB
>
> PL-USER |= (defrelation friend (?x ?y))
>
> |r|FRIEND
>
> PL-USER |= (ask (friend alice bob))
>
> UNKNOWN
>
> PL-USER |= (assert (forall (?x ?y) (friend ?x ?y)))
>
> |P|(FORALL (?x ?y)
> (<= (FRIEND ?x ?y)
> TRUE))
This is the problem. The rule that you have is just too open-ended.
It has the meaning that I noted above, and so everything should
satisfy it. But PowerLoom won't try to reason with it, because it
would be too inefficient, especially if it appeared somewhere as just
one step of some logical chain of reasoning.
As a general principle, you should never write a FORALL form without
an implication (=> or <=) inside of it.
So, a slightly better formulation might be to introduce additional
concepts like person:
(defconcept person)
and then write a rule that applies only to people:
(assert (forall (?x ?y) (=> (and (person ?x) (person ?y))
(friend ?x ?y))))
> PL-USER |= (ask (friend alice bob))
>
> UNKNOWN
You would then need to tell PowerLoom that ALICE and BOB are people:
(assert (and (person alice) (person bob)))
>
> PL-USER |= (retrieve (friend ?x ?y))
>
> WARNING: Tried to bind |V|?x to NULL value. Potentially a
> PowerLoom bug
> No solutions.
The problem here is that PowerLoom doesn't have any good way to
enumerate values of ?X, since the friend relation doesn't have any
range or domain constraints. That means everything has to be
considered as being friends, including the FRIEND relation itself,
along with all sorts of PowerLoom internal defined things.
>
>
> PL-USER |= (ask (friend alice bob))
>
> UNKNOWN
>
> PL-USER |= (ask (forall (?x ?y) (friend ?x ?y)))
>
> UNKNOWN
>
> PL-USER |= (all-facts-of alice)
>
> ()
>
> PL-USER |= (all-facts-of friend)
>
> (|P|(RELATION FRIEND) |P|(NTH-DOMAIN FRIEND 0 THING) |P|(NTH-DOMAIN
> FRIEND 1 THING) |P|(DUPLICATE-FREE FRIEND) |P|(FORALL (?x ?x)
> (<= (FRIEND ?x ?x)
> TRUE)))
This last transformation, though, is a bit odd. It looks like this
may, in fact, be a bug in PowerLoom, since this transformation is not
equivalent to the actual base rule.
But since the base rule really isn't something you should be writing,
we might take our time in tracking this down.
>
> PL-USER |= (ask (forall ?x (friend ?x ?x)))
>
> TRUE
>
> PL-USER |=
>
> ---------------------
>
> I hope someone can help me to work around this. Thanks in advance.
> _______________________________________________
> powerloom-forum mailing list
> [email protected]
> http://mailman.isi.edu/mailman/listinfo/powerloom-forum