Re: Question about all-facts-of..

Thomas Russ <[email protected]> Wed, 27 Aug 2008 10:38:26 -0700
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
ALL-FACTS-OF only reports asserted (and forward-chained) information,  
not cached information from running the query engine.



N-Command: all-facts-of ((instanceRef NAME)) : (CONS OF PROPOSITION)

Return a cons list of all definite (TRUE or FALSE) propositions that  
reference the instance instanceRef. This includes propositions  
asserted to be true by default, but it does not include propositions  
that are found to be TRUE only by running the query engine. Facts  
inferred to be TRUE by the forward chainer will be included. Hence,  
the returned list of facts may be longer in a context where the  
forward chainer has been run then in one where it has not (see run- 
forward-rules).


On Aug 27, 2008, at 8:57 AM, Srini Ram wrote:

> Hi,
>
> If I have
>
> (defconcept person (?x))
> (defrelation alive (?x))
>
> (defconcept live-person (?x person)
>   :<=> (alive ?x)
>   )
> (defrelation spouse ((?x person) (?y person))
>   :axioms (symmetric spouse))
>
> (defrelation married ((?x person) (?y person))
>     :<=> (and (spouse ?x ?y) (live-person ?x) (live-person ?y) ))
>
> (assert (spouse jack jill))
> (assert (and (alive jack) (alive jill)))
>
> Now I do the following queries:
>
> STELLA>  (all-facts-of jack)
> (|P|(SPOUSE JACK JILL) |P|(ALIVE JACK) |P|(PERSON JACK) |P?|(LIVE- 
> PERSON JACK))
>
> STELLA>  (retrieve all (married ?x ?y))
> There are 2 solutions:
>   #1: ?X=JACK, ?Y=JILL
>   #2: ?X=JILL, ?Y=JACK
>
> STELLA>  (all-facts-of jack)
> (|P|(SPOUSE JACK JILL) |P|(ALIVE JACK) |P|(PERSON JACK) |P?|(LIVE- 
> PERSON JACK)) ;; no (married jack jill)
>
> Should I not see married jack jill on the last query? I expect it to  
> be cached as a fact after the query. How can I have access to such  
> dynamic attributes of jack in all-facts-of. I tried  :elaborate?  
> TRUE as an argument of all-facts-of, to no avail.
>
> Also are
> Function: all-facts-of-instance ((self OBJECT) (includeunknownfacts?  
> BOOLEAN) (elaborate? BOOLEAN)) : (LIST OF PROPOSITION) Return a list  
> of all definite (TRUE or FALSE) propositions attached to self.
> N-Command: all-facts-of-n ((n INTEGER) &rest (instanceRefs NAME)) :  
> (CONS OF PROPOSITION) available (as documented in the misc section).  
> I get an error when trying to use them.
>
> Thanks
> Srini
>
> _______________________________________________
> powerloom-forum mailing list
> [email protected]
> http://mailman.isi.edu/mailman/listinfo/powerloom-forum