Re: Problem using instance-of

Kalle Fischer <[email protected]> Mon, 20 Sep 2010 10:51:13 +0200
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
On 09/19/2010 07:21 PM, Hans Chalupsky wrote:
> Hi,
>
> this is a known bug which has been fixed in our local copy.  The problem is
> that our current release update cycle has been suspended, because we are
> working on a new version, so our local fixes haven't made it out onto our
> web site in a while.
>
> You might be able to work around the problem by using (swell ?s) instead of
> (instance-of ?s swell).  If that doesn't do the trick, send me a full copy of
> your KB so I can see what's going on.
>
> Hans
>
> --------------------------------------------------------------------------
> Hans Chalupsky, PhD                     USC Information Sciences Institute
> Project Leader, Loom KR&R Group         4676 Admiralty Way
> <[email protected]>                           Marina del Rey, CA 90292
> (310) 448-8745
> --------------------------------------------------------------------------
>
>    
>>>>>> Kalle Fischer<[email protected]>  writes:
>>>>>>              
>    
>> Hello,
>> I am new to using PowerLoom and have some troubles with and exception
>> that is thrown whenever I want to find all instances of one certain type
>> of concept. I figured, since it is the only kind of concept for which
>> this happens, that it is most probably something in my definition of
>> that concept of one of the sub-concepts.
>>      
>
>    
>> (DEFCONCEPT WIND-SWELL (?S SWELL)
>> :<=>  (AND (HAS-CONDITION ?S ?SP) (SHORT-PERIOD ?SP) ) )
>>      
>    
>> (DEFCONCEPT GROUND-SWELL (?S SWELL)
>> :<=>  (AND (HAS-CONDITION ?S ?LP) (LONG-PERIOD ?LP)) )
>>      
>    
>> (DEFCONCEPT SHORT-PERIOD (?P PERIOD)
>> :<=>  (OR (= (HAS-PERIOD ?P) 7) (<  (HAS-PERIOD ?P) 7) ) )
>>      
>    
>> (DEFCONCEPT LONG-PERIOD (?P PERIOD)
>> :<=>  (OR (>  (HAS-PERIOD ?P) 13)  (= (HAS-PERIOD ?P) 13) ) )
>>      
>    
>> (DEFCONCEPT PERIOD (SWELL-CONDITION)
>> :=>  (EXISTS ?I (AND (INTEGER ?I) (HAS-PERIOD ?SELF ?I)) ) )
>>      
>    
>> (DEFCONCEPT SWELL (SURF-CONDITION)
>> :=>  (EXISTS ?P (AND (PERIOD ?P) (HAS-CONDITION ?SELF ?P)) )
>> :=>  (EXISTS ?O (AND (ORIGIN ?O) (HAS-PROP ?SELF ?O)) )
>> :=>  (EXISTS ?SD (AND (SWELL-DIRECTION ?SD) (HAS-CONDITION ?SELF ?SD)) )
>> :=>  (EXISTS ?S (AND (SIZE ?S) (HAS-PROP ?SELF ?S)) )
>> :=>  (EXISTS ?E (AND (EFFECT ?E) (HAS-EFFECT ?SELF ?E)) ) )
>>      
>    
>> Those are all the concepts that are involved here and I only have one
>> instance in my file. I am still getting used to the LISP way of thinking
>> so don't worry hurting my feelings by telling me that what I did there
>> is absolute nonsense. This is the exception being thrown:
>>      
>    
>>>> Error: Invocation Target Exception in funcall of function:
>>>>          
>>       public static edu.isi.powerloom.logic.QueryIterator
>> edu.isi.powerloom.logic.Logic.retrieveEvaluatorWrapper(edu.isi.stella.Cons)
>> ((ALL (INSTANCE-OF ?S @SWELL)))
>>       java.lang.ClassCastException: edu.isi.powerloom.logic.Description
>> cannot be cast to edu.isi.powerloom.logic.NamedDescription
>>       edu.isi.powerloom.logic.Description cannot be cast to
>> edu.isi.powerloom.logic.NamedDescription
>> java.lang.ClassCastException: edu.isi.powerloom.logic.Description cannot
>> be cast to edu.isi.powerloom.logic.NamedDescription
>>       at
>> edu.isi.powerloom.logic.Proposition.extractCollectionArgument(Proposition.java:3639)
>>       at
>> edu.isi.powerloom.logic.ControlFrame.tryScanCollectionProof(ControlFrame.java:1447)
>>       at
>> edu.isi.powerloom.logic.ControlFrame.executeProofStrategy(ControlFrame.java:2298)
>>       at
>> edu.isi.powerloom.logic.ControlFrame.continueCurrentOrNextStrategy(ControlFrame.java:2501)
>>       at
>> edu.isi.powerloom.logic.ControlFrame.continueStrategiesProofs(ControlFrame.java:2619)
>>       at
>> edu.isi.powerloom.logic.ControlFrame.evaluateNextMove(ControlFrame.java:4526)
>>       at
>> edu.isi.powerloom.logic.QueryIterator.executeBackwardChainingProofP(QueryIterator.java:1878)
>>       at edu.isi.powerloom.logic.QueryIterator.nextP(QueryIterator.java:1357)
>>       at edu.isi.powerloom.logic.Logic.callRetrieve(Logic.java:16537)
>>       at edu.isi.powerloom.logic.Logic.retrieve(Logic.java:16646)
>>       at
>> edu.isi.powerloom.logic.Logic.retrieveEvaluatorWrapper(Logic.java:16654)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>       at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>       at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>       at java.lang.reflect.Method.invoke(Method.java:597)
>>       at edu.isi.stella.javalib.Native.funcall(Native.java:608)
>>       at edu.isi.stella.Cons.evaluateConsTree(Cons.java:8256)
>>       at edu.isi.stella.Stella_Object.evaluate(Stella_Object.java:4341)
>>       at edu.isi.powerloom.logic.Logic.evaluateLogicCommand(Logic.java:31393)
>>       at edu.isi.powerloom.logic.Logic.logicCommandLoop(Logic.java:31292)
>>       at edu.isi.powerloom.logic.Logic.powerloom(Logic.java:37136)
>>       at edu.isi.powerloom.PLI.main(PLI.java:4850)
>>      
>    
>> Thanks already,
>> Kalle
>> _______________________________________________
>> powerloom-forum mailing list
>> [email protected]
>> http://mailman.isi.edu/mailman/listinfo/powerloom-forum
>>      
Hello,
Thanks for the quick response. It actually solved the problem for me. I 
was quite worried of having some major flaw in my KB.

cheers, Kalle.