Question about all-facts-of..

Srini Ram <[email protected]> Wed, 27 Aug 2008 08:57:55 -0700 (PDT)
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
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