Thank you! Built on your comment I found a good work-around to my Problem. I now placed the command:
(load-package se.liu.ida.JessTab.JessTabFunctions) into a separate file, that does nothing but to execute this command and than call the regular file, containing my code. So far this appears to have solved my problem, because JessDE works stable as long as I do not edit the file containing the above line. The only draw-back is that the functions I use are not recognized by JessDE so I get a lot of false Errors and Warnings. But that is much better than restarting eclipse every minute. Greetings, Christoph Ebm -----Original Message----- From: Ernest Friedman-Hill [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 04. April 2007 19:23 To: [email protected] Subject: Re: JESS: JessDE unstable with Jess and Protege The current JessDE uses regular Java reflection to learn about the classes you use, Userfunctions you load, etc. As a result, those classes get loaded into the JVM. Usually, that doesn't matter, but some classes do funky things in their static initializer blocks. This can result in all sorts of odd behavior, depending on exactly what the classes do; endless loops, out-of-memory errors, etc. Work has already begun on a future version of the JessDE using Eclipse's own class file inspection APIs, which don't load the classes. It's unclear, though, that this will work for Userfunction classes, as it's only by calling "getName()" on a Userfunction object that you can learn the name of the implemented function. On Apr 4, 2007, at 10:54 AM, ebm christoph wrote: > Good Day! > > > I am working on a Project, where I need to combine Jess with Jade > and Protégé. The problem is, I am having big troubles with the > JessDE eclipse Plug-in, as soon as I use some Protégé functions. > > > Editing regular jess code works absolutely fine, but when I edit > code, that uses Protégé or JessTab functions, like the following > code, eclipse starts using 99% of my CPU capacity and eventually > freezes completely. This happens after about 1 min of editing and > there is no error message. > > This error accurse only while editing the file. Reading or > executing it works absolutely fine. > > > I experienced the same effect on two different machines, one > running Windows 2000, the other running SuSE Linux. I am using > Eclipse SDK Version: 3.2.2, Jess 7.0p1, JessTab 16 and Protégé 3.2.1. > > > Any help is highly appreciated! > > > Christoph Ebm > > > > P.S.: Code, that makes trouble: > > (watch all) > > (load-package se.liu.ida.JessTab.JessTabFunctions) > > > (defclass Message_class ; a JADE ACL message mapped to a protege > instance > > (is-a :STANDARD-CLASS) ; class Message will inherit the standard > slots > > (slot Performative) ; get integer repesenting the type of message > as defined in jade.lang.acl.ACLMessage > > (slot Sender (type any)) ; message sender, not a String, but a > JADE AID > > (slot Content) ; message content as a String > > ) > > > (mapclass Message_class) > > > (defrule message_rule ; make a protege instance for every message > the agent tells JESS about > > ?Message <- (Message ?message) ; the agent made this JESS fact > for a message it received > > => > > (make-instance of Message_class ; a new protege instance of class > Message > > (Performative (call jade.lang.acl.ACLMessage getPerformative (? > message getPerformative))) > > (Sender (call (call ?message getSender) getName)) > > (Content (call ?message getContent)) > > ) > > (retract ?Message) > > ) > > > (defrule proposal ; example for what the agent could do with a message > > (Agent ?agent) ; the agent started with the JADE system > > ?instance <- (object) ; any protege instance would match here > > (test (eq (class ?instance) Message_class)) ; if the instance is > a Message > > (test (eq (slot-get ?instance Performative) "CFP")) ; meaning the > message is a call for proposals > > => > > (bind ?message (new jade.lang.acl.ACLMessage (get-member > jade.lang.acl.ACLMessage PROPOSE))) > > (?message setSender (?agent getAID)) ; take "my" agent as the sender > > (?message addReceiver (new jade.core.AID (slot-get ?instance > Sender) TRUE)) > > (?message setContent (slot-get ?instance Content)) ; just copy > the original content > > (?agent send ?message) > > ) > > > --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://www.jessrules.com -------------------------------------------------------------------- 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] --------------------------------------------------------------------
