Composable Coloured Petri nets
Composable Coloured Petri nets (CCPNs) are an abbreviation of Coloured Petri nets allowing the specification of a type of unidireccional transition fusion for synchronous communicationas named synchrony groups and defined in [1].
On this page you can find a preliminary implementation of a filter tool named ccpn2hcpn written in Ruby that is able to translate CPNTools models with synchrony groups to "pure" CPNTools models.
The ccpn2hcpn tool was tested in the following CPNTools files, which can also serve as examples for the specification of synchrony goups:
Basically, each transition in the CPNTools can have a SEND declaration or a RECV declaration with the following format:
(SEND, targetClass, request, qualifier1 parameter1, ..., qualifierN parameter_N)
(RECV, senderClass, request, qualifier1 parameter1, ..., qualifierN parameterN)
Their elements are presented next:
- The SEND and RECV elements specify the request
direction.
- The targetClass element can have one of two distinct meanings:
(1) the class to which a receive transition with the same request
belongs; (2) a variable which can take as values, names of classes
containing one receive transition for the specified request. The
latter allows dynamic binding instantiation.
- The request element identifies the request. Formally, each synchrony group is a triple with a send transition, a recv
transition, and a request.
- The parameters are transition variables, and the qualifiers can
take one the following values "IN", "OUT", or
"INOUT". These names are given from the send transition point
of view.
- The senderClass is the name of the send transition's page.
This allows its use as a transition variable allowing the
specification of a "return" to the sender class. In fact, it can be
seen as a permanent IN parameter. This allows the modelling of
typical method call through the use of two synchrony groups: one to
invoke the method; another to return to the caller.
An "IN" parameter must occur in the send transition input arcs
so that it can be bound when sending it to the receive transition.
Typically it will also occur in one or more of the receive transition
output arcs: the receive transition "does something" with the
received input parameter.
An "OUT" parameter must occur in the receive transition input
arcs so that it can be bound when "sending it" back to the send
transition. Typically, it will also occur in one or more of the send
transition output arcs: the send transition "does something" with the
received output parameter.
Parameter passing is made "by name": the receive transition
parameters are textually replaced by the respective send transition
parameters.
[1] Barros, J., Gomes, L.: "On the Use of Coloured Petri Nets for Object-Oriented Design".
In Cortadella, J., Reisig, W., eds.: Applications and Theory of Petri Nets 2004 25th
International Conference, ICATPN 2004, Bologna, Italy, June 21-25, 2004. Volume
3099 of Proceedings Series: Lecture Notes in Computer Science. Springer (2004)
117{136 ISBN: 3-540-22236-7.
2004-07-29
João Paulo Barros
Email: jpb[[AT]]uninova[[DOT]]pt