assert vs instance-of and other questions

Kotaro FUNAKOSHI <[email protected]>
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
Dear members,

I have three questions about PowerLoom.  I will highly appreciate it 
if somebody gives me answers.

(1) assert vs instance-of

I found an asymmetricity between (A) asserting conceptual propositions using 
command "assert" directly and (B) asserting conceptual propositions using 
relation "instance-of".

Assume the following KB:
--------------------------------------------------------------------
(defmodule "PL-USER/TEST")
(in-module "PL-USER/TEST")
(clear-module "PL-USER/TEST")
(in-dialect :KIF)

(defconcept animal)
(defconcept monkey (animal))
--------------------------------------------------------------------

case (A):
When I use command "assert", everything is fine.

|= (assert (george monkey))

|P|(MONKEY GEORGE)

|= (ask (instance-of george monkey))

TRUE

|= (ask (instance-of george animal))

TRUE

|= (ask (animal george))

TRUE

|= (ask (monkey george))

TRUE

case (B):
However if I use relation "instance-of", something goes wrong.

|= (definstance george :instance-of monkey)

|i|GEORGE

|= (ask (instance-of george monkey))

TRUE

|= (ask (instance-of george animal))

TRUE

|= (ask (monkey george))

UNKNOWN

|= (ask (animal george))

UNKNOWN


Why cannot PowerLoom answer that (monkey george) is TRUE when I use
"instance-of" even though it answers correctly against (ask (instance-of george animal))?

I just wanted to use "instance-of" because I prefer frame-style descriptions
such as
    (definstance george 
         :instance-of monkey
         :likes banana
         :at forest1
         :age 4).

I can simply avoid this problem by using always command "assert" like
    (definstance george
         :likes banana
         :at forest1
         :age 4)
    (assert (monkey george)).  ( yet not so elegant :-( )

Even avoidable, such a behavior of PowerLoom makes me feel ill at ease...
Is this an intended behavior or just a bug?



(2)  Warning: PowerLoom can't index the rule

I tried to avoid the problem described above by using a rule. But I got a
warning message "Warning: PowerLoom can't index the rule"  and the rule
seems not to work.

The rule is here:
 (defrule "instance-of TO assert"
   (forall (?x ?c)  (=> (and (concept ?c) (instance-of ?x ?c)) (?c ?x))))

What's the meaning of the message and what's wrong with my rule?



(3)  Powers of PowerLoom

This is a basic question about PowerLoom.  Is PowerLoom superior to or 
equivalent to Loom in any respects?

Loom seems have more complex syntax (maybe syntax sugars) than PowerLoom.
But yet does PowerLoom have greater expressiveness than Loom?

Should everybody use PowerLoom instead of Loom? Or somebody with some
specific purposes had better use Loom rather than PowerLoom? 



Best regards, 

Kotaro Funakoshi
Tokyo Institute of Technology
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.