|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Tried to bind |V|?x to NULL value.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: ------------ PL-USER |= (powerloom-information) |L|"PowerLoom 3.2.0 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)) PL-USER |= (ask (friend alice bob)) UNKNOWN PL-USER |= (retrieve (friend ?x ?y)) WARNING: Tried to bind |V|?x to NULL value. Potentially a PowerLoom bug No solutions. 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))) 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 powerloom-forum@... http://mailman.isi.edu/mailman/listinfo/powerloom-forum |
|
|
Re: Tried to bind |V|?x to NULL value.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 > powerloom-forum@... > http://mailman.isi.edu/mailman/listinfo/powerloom-forum _______________________________________________ powerloom-forum mailing list powerloom-forum@... http://mailman.isi.edu/mailman/listinfo/powerloom-forum |
|
|
Re: Tried to bind |V|?x to NULL value.On Sun, Aug 3, 2008 at 5:21 AM, Thomas Russ <tar@...> wrote:
> > 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. > 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)))) > Awesome, thanks!! :) All I had to do, then, is to define a concept, like "person" or "something" and then every time I define a new object, assert that the concept applies to the object. I tried it in the stable version and also downloaded the pl snapshot, as you suggested. Here's the little plm file I saved from the powerloom interface: ------------- ;;; -*- Mode: Lisp; Package: STELLA; Syntax: COMMON-LISP; Base: 10 -*- (CL:IN-PACKAGE "STELLA") (DEFMODULE "/PL-KERNEL-KB/PL-USER/FRIENDS" :INCLUDES ("PL-USER")) (IN-MODULE "/PL-KERNEL-KB/PL-USER/FRIENDS") (IN-DIALECT :KIF) (DEFRELATION FRIEND (?X ?Y)) (DEFRELATION CLOSE-FRIEND (?X ?Y)) (DEFCONCEPT SOMETHING) (DEFCONCEPT PERSON) (ASSERT (forall (?x1 ?x2) (<= (FRIEND ?x1 ?x2) (CLOSE-FRIEND ?x1 ?x2)))) (ASSERT (forall (?x1) (<= (SOMETHING ?x1) (PERSON ?x1)))) (ASSERT (PERSON ALICE)) (ASSERT (PERSON BOB)) (ASSERT (CLOSE-FRIEND ALICE BOB)) ------------------- Now, here's a little problem I had with the "why" feature (both in pl-3.2.0 and 3.2.21-snapshot). No big deal, but ... maybe I should ask in another thread. Anyway, here it goes: ---------- PL-USER |= (load "/home/martin_net/Desktop/cosas/powerloom/powerloom/friends-1") PL-USER |= (in-module "FRIENDS") FRIENDS |= (ask (friend alice bob)) TRUE FRIENDS |= (set-feature justifications) |l|(:JUSTIFICATIONS :EMIT-THINKING-DOTS :JUST-IN-TIME-INFERENCE) FRIENDS |= (ask (friend alice bob)) TRUE FRIENDS |= (why) 1 (FRIEND ALICE BOB) follows ------------- I expected it to say that (friend alice bob) came from the assertion (close-friend alice bob) and the assertion (forall (?x1 ?x2) (<= (FRIEND ?x1 ?x2) (CLOSE-FRIEND ?x1 ?x2))). What's the problem here? Regards, _______________________________________________ powerloom-forum mailing list powerloom-forum@... http://mailman.isi.edu/mailman/listinfo/powerloom-forum |
|
|
Re: Tried to bind |V|?x to NULL value.With respect to the somewhat terse "explanation": the way you defined
"close-friend" makes it a subrelation of "friend" which is proven simply via a lookup procedure which takes subrelations into account. That means it is proven via specialized code as opposed to rule chaining. Currently only some of these specialists provide deeper explanations for their results. A similar shortcoming is that PowerLoom currently can't explain results that follow via forward inference. We have some funding in the queue that among other things will address this issue and make the explanation system more complete. Hans >>>>> Martin Baldan <martinobal@...> writes: > On Sun, Aug 3, 2008 at 5:21 AM, Thomas Russ <tar@...> wrote: >> >> 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. >> 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)))) >> > Awesome, thanks!! :) > All I had to do, then, is to define a concept, like "person" or > "something" and then every time I define a new object, assert that the > concept applies to the object. I tried it in the stable version and > also downloaded the pl snapshot, as you suggested. Here's the little > plm file I saved from the powerloom interface: > ------------- > ;;; -*- Mode: Lisp; Package: STELLA; Syntax: COMMON-LISP; Base: 10 -*- > (CL:IN-PACKAGE "STELLA") > (DEFMODULE "/PL-KERNEL-KB/PL-USER/FRIENDS" > :INCLUDES ("PL-USER")) > (IN-MODULE "/PL-KERNEL-KB/PL-USER/FRIENDS") > (IN-DIALECT :KIF) > (DEFRELATION FRIEND (?X ?Y)) > (DEFRELATION CLOSE-FRIEND (?X ?Y)) > (DEFCONCEPT SOMETHING) > (DEFCONCEPT PERSON) > (ASSERT (forall (?x1 ?x2) > (<= (FRIEND ?x1 ?x2) > (CLOSE-FRIEND ?x1 ?x2)))) > (ASSERT (forall (?x1) > (<= (SOMETHING ?x1) > (PERSON ?x1)))) > (ASSERT (PERSON ALICE)) > (ASSERT (PERSON BOB)) > (ASSERT (CLOSE-FRIEND ALICE BOB)) > ------------------- > Now, here's a little problem I had with the "why" feature (both in > pl-3.2.0 and 3.2.21-snapshot). No big deal, but ... maybe I should ask > in another thread. Anyway, here it goes: > ---------- > PL-USER |= (load "/home/martin_net/Desktop/cosas/powerloom/powerloom/friends-1") > PL-USER |= (in-module "FRIENDS") > FRIENDS |= (ask (friend alice bob)) > TRUE > FRIENDS |= (set-feature justifications) > |l|(:JUSTIFICATIONS :EMIT-THINKING-DOTS :JUST-IN-TIME-INFERENCE) > FRIENDS |= (ask (friend alice bob)) > TRUE > FRIENDS |= (why) > 1 (FRIEND ALICE BOB) > follows > ------------- > I expected it to say that (friend alice bob) came from the assertion > (close-friend alice bob) and the assertion (forall (?x1 ?x2) (<= > (FRIEND ?x1 ?x2) (CLOSE-FRIEND ?x1 ?x2))). > What's the problem here? > Regards, > _______________________________________________ > powerloom-forum mailing list > powerloom-forum@... > http://mailman.isi.edu/mailman/listinfo/powerloom-forum _______________________________________________ powerloom-forum mailing list powerloom-forum@... http://mailman.isi.edu/mailman/listinfo/powerloom-forum |
|
|
Re: Tried to bind |V|?x to NULL value.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 <tar@...> 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 >> powerloom-forum@... >> http://mailman.isi.edu/mailman/listinfo/powerloom-forum > _______________________________________________ > powerloom-forum mailing list > powerloom-forum@... > http://mailman.isi.edu/mailman/listinfo/powerloom-forum _______________________________________________ powerloom-forum mailing list powerloom-forum@... http://mailman.isi.edu/mailman/listinfo/powerloom-forum |
|
|
Re: Tried to bind |V|?x to NULL value.On Tue, Aug 5, 2008 at 12:03 AM, Hans Chalupsky <hans@...> wrote:
> 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). > That's great, you fixed the bug so quickly! I've just downloaded the new snapshot and confirmed it works as described. Regards, _______________________________________________ powerloom-forum mailing list powerloom-forum@... http://mailman.isi.edu/mailman/listinfo/powerloom-forum |
| Free embeddable forum powered by Nabble | Forum Help |