RE: [jade-develop] about the representation of some jade AbsObjects


Subject: RE: [jade-develop] about the representation of some jade AbsObjects
From: Caire Giovanni (Giovanni.Caire@TILAB.COM)
Date: Tue Aug 27 2002 - 15:59:01 MET DST


Hi,
 
This "bug" was also present in JADE2.5 even if you never experienced it (look at some e-mails by Ronnie Taib circulated on the Jade mailing list). The point is that an Abstract descriptor (AbsPredicate or AbsConcept or Abs-whatever) is basically an Hashtable that maps String keys to values. The problem comes from the fact that the entries in an Hashtable are not ordered (and when the Hashtable is re-hashed the order may change). Therefore when the SLCodec gets the slots of an abstract descriptor to encode them, the order in which it actually gets them may be different with respect to that used by the SLParser to fill the abstract descriptor.
If you use the Ontology this doesn't happen as the correct order is retrieved from the schema.
 
A possible solution would be to parse the slot names and, if they start with "_JADE_UNNEMED", then the following part can be used as indexes to reconstruct the correct order. If you look at the getSlotNames() method of the SLCodec class you can do this modification by yourself.
 
Bye
 
Giovanni

-----Original Message-----
From: beiting zhu [mailto:ABZ005@motorola.com]
Sent: marted́ 27 agosto 2002 14.50
To: jade-develop@sharon.cselt.it
Subject: [jade-develop] about the representation of some jade AbsObjects

Hi jaders,
 
When I test the FIPA SL expression with SLCodec in Jade 2.6, I found something strange.
 
Case 1: (without ontology)
I typed SL expression as: ((Father_Of father ?x )), and I got the decoding result is an AbsPredicate, it is presented as: (Father_Of :_JADE.UNNAMED1 (Variable :Name x) :_JADE.UNNAMED0 father)). Then I encode this AbsPredicate back to a SL expression, and I got: ((Father_Of ?x father) ). Because the order of the AbsTerms inside this AbsPredicate has been conversed.
I have also tested AbsConcept and AbsAgentAction, the results are same. I think maybe because they inherit some classes from jade.content.abs.AbsObjectImpl.
 
Case 2: (with ontology)
I have tested the same example, but with the PeopleOntology in the package "examples.content.ontology". And I got the decoding result as an AbsPredicate:(Father_Of :FATHER father :CHILDREN (Variable :Name x)). Then I encode this this AbsPredicate back to a SL expression, and I got: ((Father_Of father ?x) ). We can see here the order is kept, because the schema "Father_Of" is defined in this way.
 
Since in Jade 2.5, I have not met this problem. With or without ontology, the composition of the AbsObjects is always same. So I want to know :
1. why Jade 2.6 has changed this point?
2. if it is a bug (since sometimes we create the agents without ontology, so in this way the AbsObjects can not present the agent's internal knowledge, and consequently influence the agent's communication), have you already done some thing for that?
 
 

Hi,
 
This "bug" was also present in JADE2.5 even if you never experienced it (look at some e-mails by Ronnie Taib circulated on the Jade mailing list). The point is that an Abstract descriptor (AbsPredicate or AbsConcept or Abs-whatever) is basically an Hashtable that maps String keys to values. The problem comes from the fact that the entries in an Hashtable are not ordered (and when the Hashtable is re-hashed the order may change). Therefore when the SLCodec gets the slots of an abstract descriptor to encode them, the order in which it actually gets them may be different with respect to that used by the SLParser to fill the abstract descriptor.
If you use the Ontology this doesn't happen as the correct order is retrieved from the schema.
 
A possible solution would be to parse the slot names and, if they start with "_JADE_UNNEMED", then the following part can be used as indexes to reconstruct the correct order. If you look at the getSlotNames() method of the SLCodec class you can do this modification by yourself.
 
Bye
 
Giovanni
-----Original Message-----
From: beiting zhu [mailto:ABZ005@motorola.com]
Sent: marted́ 27 agosto 2002 14.50
To: jade-develop@sharon.cselt.it
Subject: [jade-develop] about the representation of some jade AbsObjects

Hi jaders,
 
When I test the FIPA SL expression with SLCodec in Jade 2.6, I found something strange.
 
Case 1: (without ontology)
I typed SL expression as: ((Father_Of father ?x )), and I got the decoding result is an AbsPredicate, it is presented as: (Father_Of :_JADE.UNNAMED1 (Variable :Name x) :_JADE.UNNAMED0 father)). Then I encode this AbsPredicate back to a SL expression,  and I got: ((Father_Of ?x father) ). Because the order of the AbsTerms inside this AbsPredicate has been conversed.
I have also tested AbsConcept and AbsAgentAction, the results are same. I think maybe because they inherit some classes from jade.content.abs.AbsObjectImpl.
 
Case 2: (with ontology)
I have tested the same example, but with the PeopleOntology in the package "examples.content.ontology". And I got the decoding result as an AbsPredicate:(Father_Of :FATHER father :CHILDREN (Variable :Name x)). Then I encode this this AbsPredicate back to a SL expression,  and I got: ((Father_Of father ?x) ). We can see here the order is kept, because the schema "Father_Of" is defined in this way.
 
Since in Jade 2.5, I have not met this problem. With or without ontology, the composition of the AbsObjects is always same. So I want to know :
1. why Jade 2.6 has changed this point?
2. if it is a bug (since sometimes we create the agents without ontology, so in this way the AbsObjects can not present the agent's internal knowledge, and consequently influence the agent's communication),  have you already done some thing for that?
 
 



This archive was generated by hypermail 2a22 : Tue Aug 27 2002 - 15:59:08 MET DST