Re: Tried to bind |V|?x to NULL value.
Hans Chalupsky <[email protected]> Mon, 4 Aug 2008 15:03:34 -0700
| Newsgroups | gmane.comp.ai.powerloom |
|---|---|
| Message-ID | <[email protected]> |
What Tom said in his previous reply still applies, but your example
did uncover a bug where PowerLoom picked up an incorrect description
duplicate which led to the incorrect behavior you saw. This should be
fixed with the next PowerLoom snapshot which should build
automatically overnight. I ran your example again with the fixed
version and it now answers everything correctly (the retrieve still
doesn't give answers for the reasons Tom explained, but the asks now
do the right thing).
Hans
STELLA(3): (defobject alice)
|i|ALICE
STELLA(4): (defobject bob)
|i|BOB
STELLA(5): (defrelation friend (?x ?y))
|r|FRIEND
STELLA(6): (ask (friend alice bob))
UNKNOWN
STELLA(7): (assert (forall (?x ?y) (friend ?x ?y)))
|P|(FORALL (?x ?y)
(<= (FRIEND ?x ?y)
TRUE))
STELLA(8): (ask (friend alice bob))
TRUE
STELLA(9): (retrieve (friend ?x ?y))
WARNING: Tried to bind |V|?x to NULL value. Potentially a PowerLoom bug
No solutions.
STELLA(10): (ask (friend alice bob))
TRUE
STELLA(11): (ask (forall (?x ?y) (friend ?x ?y)))
TRUE
STELLA(12): (all-facts-of alice)
()
STELLA(13): (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 ?y)
(<= (FRIEND ?x ?y)
TRUE)))
;; this is now true, since it is applied by the rule above:
STELLA(14): (ask (forall ?x (friend ?x ?x)))
TRUE
STELLA(15):
>>>>> Thomas Russ <[email protected]> writes:
> 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
> _______________________________________________
> powerloom-forum mailing list
> [email protected]
> http://mailman.isi.edu/mailman/listinfo/powerloom-forum