Subsections
Object interactions in OOPN are initiated by transitions.
Transitions in high-level Petri nets may have guards and
actions:
- Transition guards are evaluated during transition firability testing.
There must be no side effect. It only allows atomic decision if the transition
can or cannot be executed.
- On the other hand, transition actions are evaluated during transition
execution. There is also possibible to think about non-atomic execution of
transition action (start and end of action) and a possibility of a side
effect (such as a message sending in OOPN).
In OOPN, each expression of inscription language specifies a message sending. It
means that both guard and action contain message sendings. If the receiver of
the message is a primitive object (i.e. not described by an OOPN class), then
the semantics is the same as in the case of the well-known high-level Petri
nets. Let us now suppose a non-primitive object as a receiver. Since there is a
difference in semantics of a guard and an action we can distinguish two
kinds of object interactions. Both these interactions are specified as
message sending:
- Message sending in transition guard means atomic synchronous
interaction, which is realized by synchronous ports invocation
(will be discussed later).
- Message sending in transition action means a client-server (request-reply) interaction which is realized by invocation of
method nets.
- Method nets are high-level Petri nets with message patterns
attached to them and with parameter-places and a return-place.
- A method net can access places belonging to corresponding object net.
- Method nets are dynamically instantiated by message passing
specified by transition actions. Of course, polymorphism takes place here, just like in
Smalltalk.
- Events connected to a method net invocation are:
send (F - fork, creation of a new process - instance of method net) and
receive (J - join, terminating of the method net instance).
- Synchronous ports are virtual transitions in object net with
message patterns attached to them.
- They are intended for synchronous interaction of objects. The synchronous
interactions (invocation of synchronous ports) are specified in transition
guards as message sendings (polymorphism aplies here).
- A (sender) transition is firable only if the receiver of the message in
its guard agree with it (the involved synchronous port is firable).
- The invoked synchronous port (all invoked s. ports)
are executed simultaneously with the sender transition.
- The semantics of the synchronous interaction can be described as a
transition which is a fusion of the sender transition and the synchronous port
(respecting polymorphism and parameters binding). It behaves as the fusion
transition.
Vladimir Janousek
2001-01-15