[Modeling] Modeling an Agent Class- problem with operations:

James Odell email@jamesodell.com
Mon, 23 Jun 2003 17:09:01 -0400


> There seem to be two possible solutions for your problem with operations:
> 
> 1) turn off this feature (of classes having operations that can be
> called) in a AUML Profile for domain/analysis modeling
> 
> 2) restrict the allowed callers of the operation to self (by means
> of suitable constraints defined for the AUML Profile).

A third possible solution I have seen is to have one method called
"handleRequest" to which all agent-based (or active object-based) messages
are sent.

A fourth would be to use new signal reception processing feature in UML 2.0:

        Reception (from Communications) - Page 355
-Description
A reception is a declaration stating that a classifier is prepared to react
to the receipt of a signal. A reception designates a signal and specifies
the expected behavioral response. The details of handling a signal are
specified by the behavior associated with the reception or the classifier
itself.

-Semantics
The receipt of a signal instance by the instance of the classifier owning a
matching reception will cause the asynchronous invocation of the behavior
specified as the method of the reception. A reception matches a signal if
the received signal is a subtype of the signal referenced by the reception.
The details of how the behavior responds to the received signal depends on
the kind of behavior associated with the reception. (For example, if the
reception is implemented by a state machine, the signal event will trigger a
transition and subsequent effects as specified by that state machine.)


      Signal (from Communications) - Page 356
-Description
A signal is a specification of type of send request instances communicated
between objects. The receiving object handles the signal instance as
specified by its receptions. The data carried by a send request and passed
to it by the occurrence of the send invocation event that caused the request
is represented as attributes of the signal instance. A signal is defined
independently of the classifiers handling the signal.

-Semantics
A signal triggers a reaction in the receiver in an asynchronous way and
without a reply. The sender of a signal will not block waiting for a reply
but continue execution immediately. By declaring a reception associated to a
given signal, a classifier specifies that its instances will be able to
receive that signal, or a subtype thereof, and will respond to it with the
designated behavior. An exception is also represented as signal and is
typically used to indicate fault situations.


This last one is much closer to what we need.

-Jim


On 6/23/03 1:56 PM, "Wagner, G.R." indited:

> There seem to be two possible solutions for your problem with operations:
> 
> 1) turn off this feature (of classes having operations that can be
> called) in a AUML Profile for domain/analysis modeling
> 
> 2) restrict the allowed callers of the operation to self (by means
> of suitable constraints defined for the AUML Profile).
> 
> Does this help?
> 
> -Gerd
> 
> 
> -----Original Message-----
> From: Dr. Hong Zhu
> To: ModelingTC
> Sent: 23.06.2003 10:21
> Subject: Re: [Modeling] Modeling an Agent Class- register your opinion
> 
> Let's assume that it can be done this way, then, we must consider agents
> are
> special case of objects, because the semantics of class is defined as
> follows. (the following is taken from Jim's email about UML's definition
> of
> class)
> "-Semantics
> The purpose of a class is to specify a classification of objects and to
> specify the features that characterize the structure and behavior of
> those
> objects."
> 
> The question is, then, "Can agents be objects?" I doubt about it,
> because
> the semantics of object has this features defined as a part of UML
> class'
> semantics: (also taken from Jim's email)
> "Operations of a class can be invoked on an object, given a particular
> set
> of substitutions for the parameters of the operation." Does this give
> object
> the freedon to refuse invocation of its operation? I think, a
> characteristics of agents is that "agent can say no to operation
> invocation". This is also from Jim's work.
> 
> Hong
> 
> ----- Original Message -----
> From: "James Odell" <email@jamesodell.com>
> To: "ModelingTC" <modeling@fipa.org>
> Sent: Saturday, June 21, 2003 7:01 PM
> Subject: Re: [Modeling] Modeling an Agent Class- register your opinion
> 
> 
>> On 6/20/03 7:45 AM, "Dr. Hong Zhu" indited:
>> 
>>>> When you simply use the word Agent as the class name of the class
> Agent
>>>> you can produce a meta model in UML. Using UML as the modelling
>>>> language does not mean that the behaviour of agents necessarily has
> been
>>>> limited to OO.
>>>> 
>>> 
>>> I don't think the semantic definition of UML can be interpreted that
> way.
>> 
>> And, I am not so sure that it cannot be.  I guess it's time for us all
> to
>> demonstrate it one way or another.
>> 
>> -Jim
>> 
>> _______________________________________________
>> Modeling mailing list
>> Modeling@www.fipa.org
>> http://fipa.org/mailman/listinfo/modeling
>> 
> 
> _______________________________________________
> Modeling mailing list
> Modeling@www.fipa.org
> http://fipa.org/mailman/listinfo/modeling
> 
> _______________________________________________
> Modeling mailing list
> Modeling@www.fipa.org
> http://fipa.org/mailman/listinfo/modeling