Hello, Ernest!
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 01, 2004 9:07 PM
Subject: Re: JESS: FW: Re:Bad index 53 in call to set() on this vector


> I think [EMAIL PROTECTED] wrote:
>
> >   Message: Bad index 53 in call to set() on this vector: (MAIN::object
(is-a
> > pRAWILO-dEJSTWIE) (is-a-name "pRAWILO-dEJSTWIE") (OBJECT
> > <External-Address:edu.stanford.smi.protege.model.DefaultCls>)
(NAZWANIE )
> > (OPISANIE ) (STATUS ) (CELX-DOSTIGNUTA ) (SHEMA-SCENARIQ )
(NA^ALXNYE-\TAPY
> > ) (TEKU]IJ-\TAP ) (KONE^NYE-\TAPY ) (DEJSTWIQ ) ([EMAIL PROTECTED] )
(SCENARIJ
> > ) (WARIANTY ) (\TAP ) (^ASTNYJ-SCENARIJ ) (CWET ) (SKOROSTX ) (KURS )
> > ([IROTA ) (IMQ ) (DOLGOTA ) (TIP ) (RADIUS ) (SOBYTIE ) (IMQ2 ) (IMQ1 )
> > (DEQTELXNOSTX ) (BARXER ) (OB_EKTY ) (SHEMA ) (\TAPY ) (DEJSTWUET )
(IMENA )
> > (KANDIDATY ) (ZONA ) (SLOT ) (DEJSTWIE ) (SRABOTAL ) (REKOMENDACII )
(:ROLE
> > Concrete) (:DOCUMENTATION ) (:SLOT-CONSTRAINTS ) (:DIRECT-INSTANCES
> > <External-Address:edu.stanford.smi.protege.model.DefaultSimpleInstance>
> > <External-Address:edu.stanford.smi.protege.model.DefaultSimpleInstance>
> > <External-Address:edu.stanford.smi.protege.model.DefaultSimpleInstance>)
> > (:DIRECT-SUPERCLASSES
> > <External-Address:edu.stanford.smi.protege.model.DefaultCls>)
> > (:DIRECT-SUBCLASSES ) (:DIRECT-TEMPLATE-SLOTS
> > <External-Address:edu.stanford.smi.protege.model.DefaultSlot>) (:NAME
> > "qWLENIE") (:DIRECT-TYPE
> > <External-Address:edu.stanford.smi.protege.model.DefaultCls>)
> > (PRAWILO-NA^ALO "(assert-string ?SOBYTIE)") (PRAWILO-OKON^ANIE )
> > (PRAWILO-POWTORENIE "(NI^EGO-NE-DELATX)")).
> >   Program text: ( batch d:/Scenario/jess/clp/init.clp )  at line 1.
> >
> > at jess.ValueVector.set(ValueVector.java:109)
> > at jess.Node1MTMF.createModifiedFact(Node1MTMF.java:137)
> >
>
> OK. The code we're talking about basically gets the slot data for a
> multifield, processes it, and then constructs new facts with modified
> versions of this data in the same slot. So the same index value that's
> being complained about by ValueVector.set() was actually used by
> ValueVector.get() a few lines before; both of these methods have the
> identical index-checking code, so if set() is going to throw, get()
> should throw too, but for some reason, it does not. The index is a
> private data member that is never modified once set in the constructor
> of the Node1MTMF class.
>
> So I'm stumped. If you can send to me, personally, a complete,
> runnable, smallest-possible-program which shows this error, I'd be
> happy to look at it.
>

All is going on inside Protege+JessTab+Jess framework, so I have to send to
you Protege project and you have to have Protege installed on you machine.
But, I have come to know in what's the problem and found workaround for it.
Shortly:
1. The function (mapclass) of JessTab generates from Protege knowledge base
only one deftemplate and at the same time a list of facts like this: (object
...)
2. After that I am loading the rules for this deftemplate and get the
Exception above.
3. I have written a hack that splits the function (mapclass) on two
functions (map-only-class) and (map-class-instances). Former is only
generates deftemplate and latter is only generates facts for it.
4. And now I do like this:
    1). (map-only-class ...);
    2). load rules (so, rules are loaded while facts are not yet for the
deftemplate!)
    3).(map-class-instances ..)
    ... Exception disappeared!

I don't know is this feature or a bug.
If Henric Ericsson have read this, he maybe consider to add this two new
functions to JessTab. I can post the code, though it is trivial.
Thank you for the help and Good lack to Jess! :)

Sincerely,
        Ru

>
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Science and Engineering PSEs        Phone: (925) 294-2154
> Sandia National Labs                FAX:   (925) 294-2234
> PO Box 969, MS 9012                 [EMAIL PROTECTED]
> Livermore, CA 94550         http://herzberg.ca.sandia.gov
>
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> (use your own address!) List problems? Notify [EMAIL PROTECTED]
> --------------------------------------------------------------------
>
>

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to