**4. Firing of transitions in sequential object Petri nets**

An important term used at the implementation of the mechanism of firing of transitions in a sequential object Petri net is the term of **binding of the arc sequence** contained in the value of *AF*, or *MAF*, function of the particular arc, or multiarc, to the token found at a certain marking of the net page in the place associated with this arc (for short, we will refer to that in the text also as **binding of token**).

Let *T Tokens*, *T* = *<t1*, *t2*, *…*, *tn*>, where *n N*, *AS ArcSeq*. We denote, that there exists **input binding of the arc sequence** *AS* to the token *T*, if there exists mapping *InputBind*: *AS T* that satifies the following:


202 Petri Nets – Manufacturing and Computer Science

**Figure 2.** Sequential object Petri net

, *PN*) is a sequential object Petri net, *PG* 

, *PN*) is a sequential object Petri net, *PG* 

*MA*): *a =* (*y, x*)}. We denote the set *InputNodes*(*x*) by *x.*

 *MA*): *a =* (*x, y*)}. We denote the set *OutputNodes*(*x*) by *x.*

**4. Firing of transitions in sequential object Petri nets** 

of the net page *PG* we understand the mapping *M*: (*P IP OP*) *Tokens***EMS***,* where *P PG, IP PG, OP PG.* By the marking of the net *SOPN* we understand the marking of all its

i. by *InputArcs*(*x*) we denote the set of all input arcs of selected place, output place or transition *x*, ie.  *x*  (*P OP T*)  *PG*: *InputArcs*(*x*) = {*a A | y* (*P IP T*): *a =* 

ii. by *InputMultiArcs*(*x*) we denote the set of all input multiarcs of selected place, output place or transition *x*, ie. *x*  (*P OP T*)  *PG*: *InputMultiArcs*(*x*) *=* {*a MA | y* (*P* 

iii. by *InputNodes*(*x*) we denote the set of all input nodes of selected place, output place or transition *x*, ie.  *x*  (*P OP T*)  *PG*: *InputNodes*(*x*) = {*y*  (*P IP T*) *| a*  (*A* 

iv. by *OutputNodes*(*x*) we denote the set of all output nodes of selected place, input place or transition *x*, ie.  *x*  (*P IP T*)  *PG*: *OutputNodes*(*x*) *=* {*y*  (*P OP T*) |  *a*  (*A* 

v. by *TransitionInputVariables*(*x*) we denote the set of all variables included in the values of arc functions *AF* (resp. multiarc functions *MAF*) of all the input arcs and multiarcs of the transition *x*, ie. *x T PG*: *TransitionInputVariables*(*x*) *=* {*v* | ((*v variables*(*AF(y*))

An important term used at the implementation of the mechanism of firing of transitions in a sequential object Petri net is the term of **binding of the arc sequence** contained in the value of *AF*, or *MAF*, function of the particular arc, or multiarc, to the token found at a certain marking of the net page in the place associated with this arc (for short, we will refer to that

(*v*  v*ariables*(*MAF(y*))) ((*y InputArcs*(*x*)) (*y InputMultiArcs*(*x*)))}.

is its page. Then:

is its net page. By the marking *M* 

 *IP T*): *a =* (*y, x*)}.

in the text also as **binding of token**).

Let *SOPN =* (

net pages.

Let *SOPN =* (

(*y, x*)}*.*


Then, input binding of the arc sequence *AS* to the token *T* via mapping *InputBind*: *AS T* can be successfully realized in the following two cases:

i. Arc sequence is in the form *AS* = *<a1*, *a2*, …, *an>*, where *n N*, i.e. it holds that *length***(***AS***) =** *length***(***T***) =** *n*, while generally **more than one** of elements *a1*, *a2*, …, *an* of that sequence can be the element of the set *#IDENT*. Then, at the input binding of the arc sequence *AS* to the token *T* we execute, informally said, binding of mutually corresponding elements of sequences according to their order. If an element *ai* of the arc sequence *AS* is a nonnegative integer, then such element must be bound to single-element *ti* of token *T*, where 1 ≤ *i* ≤ *n*, which is also nonnegative integer and the value of both those numbers must be identical. If *u* and *v* are two identical variables of the arc sequence *AS*, then the values of elements of the token *T* bound to them must be identical. Figure 3 shows a very simple example of input binding of the arc sequence *AS* = <1, a, a, #c, 3> to the token *T* = <1, 10, 10, 2, 3>:

$$\begin{array}{c} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \\ \mathsf{T} \mathrel{\mathop{:}} \mathsf{S} \mathrel{\mathop{:}} \mathsf{S} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \mathrel{\mathop{:}} \mathsf{T} \\ \mathsf{A} \mathsf{S} \mathrel{\mathop{:}} \mathsf{S} \mathrel{\mathop{:}} \mathsf{T} \end{array}$$

**Figure 3.** Binding of arc sequence to token

ii. Arc sequence is in the form *AS* = *<a1*, *a2*, …, *ak-1*, *ak*, *ak+1*, …, *am>*, where *m N*, holds that *length***(***AS***) <** *length***(***T***)**, i.e. *m* < *n*, and at the same time just a single element *ak #IDENT*, where 1 ≤ *k* ≤ *m*. Then, that only element *ak* is bound to the **sequence** *<tk*, *tk+*1, *…*, *tk+n-m>* of elements of the token *T*. In binding of other elements of the sequence *AS* the same rules hold as it was in the case of (i). An example of that type of binding of the arc sequence *AS* = <x, #y, 5, z> (and thus element *a2 #IDENT*) to the token *T* = <4, 8, 10, 2, 5, 19> is shown in Figure 4.

$$\begin{array}{rcl} \mathsf{T} \mathrel{\mathop{\mathsf{4}}\nolimits \mathsf{4}, \mathsf{8}, \mathsf{10}, \mathsf{2}, \mathsf{5}, \mathsf{19} \rhd \\ \mathsf{T} \mathrel{\mathop{\mathsf{1}}\nolimits \mathsf{2}}\nolimits \mathsf{3}, \mathsf{2} \\ \mathsf{AS} \mathrel{\mathop{\mathsf{1}}\nolimits \mathsf{3}, \mathsf{4} \forall \mathsf{y}, \mathsf{5}, \mathsf{z} \\ \end{array}$$

Sequential Object Petri Nets and the Modeling of Multithreading Object-Oriented Programming Systems 205

Thus transition *t* on the net page *PG* of the net *SOPN* is *enabled*, if the following is satisfied:

i. for all the input arcs (*p*, *t*), resp. input multiarcs (*p, t*), of the transition *t* there exists input binding of the value of the arc function *AF*(*p*, *t*) to some token *e* in the place *p* of

ii. for all the input multiarcs (*p*, *t*) of the transition *t* there exists input binding of the value of the multiarc function *MAF*(*p*, *t*) to some token *e* in the output place of the net page that is given by the value of the output place function *OPF* of the multiarc (*p, t*) in the

iii. if *u* and *v* are two equal variables of the set *TransitionInputVariables*(*t*), then the values of elements (resp. subsequences) bound by them in the frame of mapping *InputBind* must

Figure 5 shows the fragment of sequential object Petri net in its marking *M* and the construction of the mapping *InputBind*: *AF*(**P1**, **T1**) <2, 0>, where <2, 0> *M*(**P1**) and *InputBind*: *AF*(**P2**, **T1**) <1, 1, 1>, where <1, 1, 1> *M*(**P2**). It is easily to find that transition

Partial mapping *OutputBind*: *ArcSeq Tokens* is for the given transition *t* of the net page realized only in case that the transition *t* is enabled in the marking *M* of the net. Hence, partial mapping *OutputBind* assigns the selected arc sequence *AS* the **token**, being the element of the set of all *Tokens* (i.e. that token is not generally located in any of places of the net *SOPN* in its current marking *M*). The definition assumes that arc sequence *AS* is generally in the form *AS* = *<a1*, *a2*, …, *an*>, *n N*. The value *OutputBind*(*<a1*, *a2*, …, *an*>), which is generally the element of the set *Tokens*, is given by concatenation of sequences in the form *OB*(*a1*) *OB*(*a2*) … *OB*(*an*), while individual values *OB*(*ai*) are for 1 ≤ *i* ≤ *n* determined according

Regarding recursive nature of the partial mapping *OutputBind* we will include several examples of binding of the arc sequences to elements of the set *Tokens*. Let us assume in all cases that a certain sequential object Petri net *SOPN* is given containing the transition **T**, whose set of input variables *TransitionInputVariables*(**T**) = {a, b, c, x, #x} and in certain

the marking *M*,

net marking *M*,

**Figure 5.** Mapping *InputBind* in sequential object Petri net

be equal.

**T1** is enabled.

to specified rules.

**Figure 4.** Binding of arc sequence to token

Next examples of the arc sequences binding to tokens in a sequential object Petri net involve:


Let *SOPN =* (, *PN*) is a sequential object Petri net, *PG* is a net page, *t T* is a transition of the net page *PG*, *p t*  (*P IP*) is a place or input place of the net page *PG*, *q t* (*P OP*) is a place or output place of the net page *PG*, *M* is a marking of the net *SOPN*. Transition *t* is *enabled* in the marking *M* of the net *SOPN*, if:


((*u* = *v*) (*InputBind*(*u*) == *InputBind*(*v*))).

If transition *t* is enabled in the marking *M* of the net *SOPN,* we record that fact symbolically in the form of *t en M*.

Let *AS* = *<a1*, *a2*, *…*, *an*> *ArcSeq*, *n N*. If transition *t* is *enabled* in the marking *M* of the net *SOPN*, then we say, that there exists partial mapping *OutputBind*: *ArcSeq Tokens*, if

*OutputBind*(*AS*) = *OB*(*a1*) *OB*(*a2*) … *OB*(*an*)

where *OB*: *ArcSeq Tokens* and *i*, 1 ≤ *i* ≤ *n*:


Thus transition *t* on the net page *PG* of the net *SOPN* is *enabled*, if the following is satisfied:


Figure 5 shows the fragment of sequential object Petri net in its marking *M* and the construction of the mapping *InputBind*: *AF*(**P1**, **T1**) <2, 0>, where <2, 0> *M*(**P1**) and *InputBind*: *AF*(**P2**, **T1**) <1, 1, 1>, where <1, 1, 1> *M*(**P2**). It is easily to find that transition **T1** is enabled.

**Figure 5.** Mapping *InputBind* in sequential object Petri net

204 Petri Nets – Manufacturing and Computer Science

**Figure 4.** Binding of arc sequence to token

*InputBind*(a) = 1 and *InputBind*(a) = 2),

*InputBind*(x) = <1, 2>, *InputBind*(y) = <3, 3>,

*InputBind*(x) = <1, 2>, *InputBind*(#y) = <<3, 3>, 4>.

Transition *t* is *enabled* in the marking *M* of the net *SOPN*, if:

, *PN*) is a sequential object Petri net, *PG*

iii. *u TransitionInputVariables*(*t*) *v TransitionInputVariables*(*t*):

2, *InputBind*(1) = 1,

1, *InputBind*(#y) = <2, 3>,

in the form of *t en M*.

where *OB*: *ArcSeq Tokens* and *i*, 1 ≤ *i* ≤ *n*:

a. *OB*(*ai*) = <*InputBind*(*ai*)>, if *ai IDENT*, b. *OB*(*ai*) = *InputBind*(*ai*), if *ai #IDENT*, c. OB(*ai*) = *ai*, if *ai*  **Tokens**,

d. *OB*(*ai*) = <*OB*(*x*)>, if *ai* = <*x*>, where *x ArcSeq*, e. *OB*(*ai*) = <@(*OB*(*x*))>, if *ai* = @(*x*), where *x ArcSeq*,

2, 3>,

Let *SOPN =* (

Next examples of the arc sequences binding to tokens in a sequential object Petri net involve: arc sequence <a, a, 1> can be successfully bound to token <2, 2, 1>, where *InputBind*(a) =

arc sequence <a, a, 1> cannot be successfully bound to token <1, 2, 3> (it would hold that

arc sequence <#x> can be successfully bound to token <1, 2, 3>, where *InputBind*(#x) = <1,

arc sequence <x, #y> can be successfully bound to token <1, 2, 3>, where *InputBind*(x) =

arc sequence <x, y> can be successfully bound to token <<1, 2>, <3, 3>>, where

arc sequence <x, #y> can be successfully bound to token <<1, 2>, <3, 3>, 4>, where

of the net page *PG*, *p t*  (*P IP*) is a place or input place of the net page *PG*, *q t* (*P OP*) is a place or output place of the net page *PG*, *M* is a marking of the net *SOPN*.

i. (*p, t*) (*InputArcs*(*t*) *InputMultiArcs*(*t*)) *InputBind*: *AF*(*p, t*) *e*, where *e M*(*p*), ii. (*p, t*) *InputMultiArcs*(*t*) *InputBind*: *MAF*(*p, t*) *e*, where *e M*(*OPF*(*p, t*)),

((*u* = *v*) (*InputBind*(*u*) == *InputBind*(*v*))). If transition *t* is enabled in the marking *M* of the net *SOPN,* we record that fact symbolically

Let *AS* = *<a1*, *a2*, *…*, *an*> *ArcSeq*, *n N*. If transition *t* is *enabled* in the marking *M* of the net *SOPN*, then we say, that there exists partial mapping *OutputBind*: *ArcSeq Tokens*, if

*OutputBind*(*AS*) = *OB*(*a1*) *OB*(*a2*) … *OB*(*an*)

f. *OB*(*ai*) =*OB*(*b1*) *OB*(*b2*) … *OB*(*bk*), if *ai* = *b1 b2* … *bk*, where *b1*, *b2*,…, *bk ArcSeq*, *k N*, g. *OB*(*ai*) =*OB*(*b*)\*(*OB*(*x*)), if *ai* = *b*\*(*x*), where *b* (*IDENT N0*), *x ArcSeq*.

is a net page, *t T* is a transition

Partial mapping *OutputBind*: *ArcSeq Tokens* is for the given transition *t* of the net page realized only in case that the transition *t* is enabled in the marking *M* of the net. Hence, partial mapping *OutputBind* assigns the selected arc sequence *AS* the **token**, being the element of the set of all *Tokens* (i.e. that token is not generally located in any of places of the net *SOPN* in its current marking *M*). The definition assumes that arc sequence *AS* is generally in the form *AS* = *<a1*, *a2*, …, *an*>, *n N*. The value *OutputBind*(*<a1*, *a2*, …, *an*>), which is generally the element of the set *Tokens*, is given by concatenation of sequences in the form *OB*(*a1*) *OB*(*a2*) … *OB*(*an*), while individual values *OB*(*ai*) are for 1 ≤ *i* ≤ *n* determined according to specified rules.

Regarding recursive nature of the partial mapping *OutputBind* we will include several examples of binding of the arc sequences to elements of the set *Tokens*. Let us assume in all cases that a certain sequential object Petri net *SOPN* is given containing the transition **T**, whose set of input variables *TransitionInputVariables*(**T**) = {a, b, c, x, #x} and in certain marking *M* of the net *SOPN* there exists binding of those input variables given as follows: I*nputBind*(a) = 10, *InputBind*(b) = 2, *InputBind*(c) = <<1, 1>, 3>, *InputBind*(x) = <1, 2, 3>, *InputBind*(#x) = <1, 2, 3>. In the following examples we will investigate values of partial mapping *OutputBind* applied to various values of the arc sequence *AS*.

Sequential Object Petri Nets and the Modeling of Multithreading Object-Oriented Programming Systems 207

is a net page, *t T* is a transition

value of the output place function *OPF*(**Prim.P2**, **Prim.T2**) = **Sub.First**, whose marking *M*(**Sub.First**) = 1`<3>. So we investigate, if there exists mapping *InputBind*: <y> <3>. We can easily determine that the mapping exists and it holds that *InputBind*(y) = 3. Generally,

So it can be stated that for both transitions **Prim.T1** a **Prim.T2** exist particular input bindings of all the transition input variables associated with their input arcs and thus, both transitions are enabled. We are further interested, if there exists the mapping *OutputBind* of the values of functions *AF* and *MAF* associated with output arcs (or multiarcs) of both transitions. With transition **Prim.T1** is associated the only output multiarc (**Prim.T1, Prim.P2**) whose value of the arc function *AF*(**Prim.T1, Prim.P2**) = <a> and the value of the multiarc function *MAF*(**Prim.T1, Prim.P2**) = <a>. So we can easily find out that *OutputBind*(<a>) = <2>. With the transition **Prim.T2** is associated the only output arc (**Prim.T2, Prim.In**) whose value of the arc function *AF*(**Prim.T2, Prim.In**) = <a, y>. So again, we can easily find out that

i. If the transition *t* is enabled in the marking *M,* then we obtain by its **firing** marking *M'* 

*M'*(*q*) *= M*(*q*) \ *InputBind*(*MAF*(*p, t*)), if (*p t*) ((*p*, *t*) *MA*) (*q* = *OPF*(*p*, *t*)) ( *InputBind*: *MAF*(*p*, *t*) *e*, *e M*(*OPF*(*p*, *t*))), *M'*(*q*) *= M*(*q*)  *OutputBind*(*MAF*(*t, p*)), if (*p t*) ((*t*, *p*) *MA*) (*q* = *IPF*(*t*, *p*)).

ii. Firing of transition *t T,* which will change the marking *M* of the sequential object Petri

*iii.* Step is understood as firing of non-empty subset from the set of enabled transitions in the given marking *M* of the sequential object Petri net *SOPN*. Step Y which will the

iv. Let step *Y* be enabled at the marking *M* of the net *SOPN.* If *t1, t2 Y* and *t1 t2,*we say then that transitions *t1* a *t2* are **concurrently enabled** and that fact is symbolically

Firing of transition will result in the new marking of given sequential object Petri net, which

from each input place *p* of the fired transition *t* we will remove the (unique) token in the

to each output place *p* of the fired transition *t* we will add up the (unique) token which

*M'*(*p*) *= M*(*p*) \ *InputBind*(*AF*(*p, t*)), if (*p t*) ((*p*, *t*) (*A MA*)) ( *InputBind*: *AF*(*p*, *t*) *e*, *e M*(*p*)), *M'*(*p*) *= M*(*p*) *OutputBind*(*AF*(*t, p*)), if (*p t*) ((*t*, *p*) (*A MA*)),

net *SOPN* into the marking *M',* is symbolically denoted as *M* [ *t M'*.

marking *M* into the marking *M'* is symbolically denoted as *M* [ *Y M'*.

marking *M*, which is bound to the value of the arc function *AF*(*p*, *t*),

is the value of partial function *OutputBind*(*AF*(*t, p*)),

for the transition **Prim.T2** holds that *InputBind*(a) = 1 and *InputBind*(y) = 3.

, *PN*) is a sequential object Petri net, *PG*

of the net page *PG*, *M* is a marking of the net *SOPN*.

*M'*(*p*) *= M*(*p*), otherwise.

of the net *SOPN*, defined as follows:

denoted in the form of {*t1*, *t2*} *en M.*

we will obtain as follows:

*OutputBind*(<a, y>) = <1, 3>.

Let *SOPN =* (


**Figure 6.** Marking of sequential object Petri net

Figure 6 shows the net pages **Prim** and **Sub** of a certain sequential object Petri net in their marking *M* and we are interested, if there exists input binding of transition variables associated with the transitions **Prim.T1** and **Prim.T2**. With the transition **Prim.T1** is associated one input arc (**Prim.in, Prim.T1**) whose value of the arc function *AF*(**Prim.in, Prim.T1**) = <a>, and thus the set *TransitionInputVariables*(**Prim.T1**) = {a}. We can easily determine that for the input arc (**Prim.in, Prim.T1**) there exists mapping *InputBind*: <a> <2>, and thus holds that *InputBind*(a) = 2. With the transition **Prim.T2** is associated one input multiarc (**Prim.P2, Prim.T2**) whose value of arc function *AF*(**Prim.P2, Prim.T2**) = <a>, the value of multiarc function *MAF*(**Prim.P2, Prim.T2**) = <y> and thus the set *TransitionInputVariables*(**Prim.T2**) = {a, y}. And again, we can easily determine that for the input multiarc (**Prim.P2, Prim.T2**) there exists mapping *InputBind*: <a> <1>, and thus holds that *InputBind*(a) = 1. With that input multiarc it is also necessary to determine the mapping *InputBind*: *MAF*(**Prim.P2**, **Prim.T2**) e, where *e M*(*OPF*(**Prim.P2**, **Prim.T2**)). The value of the output place function *OPF*(**Prim.P2**, **Prim.T2**) = **Sub.First**, whose marking *M*(**Sub.First**) = 1`<3>. So we investigate, if there exists mapping *InputBind*: <y> <3>. We can easily determine that the mapping exists and it holds that *InputBind*(y) = 3. Generally, for the transition **Prim.T2** holds that *InputBind*(a) = 1 and *InputBind*(y) = 3.

206 Petri Nets – Manufacturing and Computer Science

3>><1> = <<<1, 1>, 3>, 1>.

<1, 2, 3, 1, 2, 3>.

marking *M* of the net *SOPN* there exists binding of those input variables given as follows: I*nputBind*(a) = 10, *InputBind*(b) = 2, *InputBind*(c) = <<1, 1>, 3>, *InputBind*(x) = <1, 2, 3>, *InputBind*(#x) = <1, 2, 3>. In the following examples we will investigate values of partial

if *AS* = <c, 1>, then *OutputBind*(<c, 1>) = *OB*(c) *OB*(1) = <*InputBind*(c)><1> = <<<1, 1>,

if *AS* = <b\*(#x)>, then *OutputBind*(<b\*(#x)>) = *OB*(b\*(#x)) = *OB*(b)\*(*OB*(#x)) =

Figure 6 shows the net pages **Prim** and **Sub** of a certain sequential object Petri net in their marking *M* and we are interested, if there exists input binding of transition variables associated with the transitions **Prim.T1** and **Prim.T2**. With the transition **Prim.T1** is associated one input arc (**Prim.in, Prim.T1**) whose value of the arc function *AF*(**Prim.in, Prim.T1**) = <a>, and thus the set *TransitionInputVariables*(**Prim.T1**) = {a}. We can easily determine that for the input arc (**Prim.in, Prim.T1**) there exists mapping *InputBind*: <a> <2>, and thus holds that *InputBind*(a) = 2. With the transition **Prim.T2** is associated one input multiarc (**Prim.P2, Prim.T2**) whose value of arc function *AF*(**Prim.P2, Prim.T2**) = <a>, the value of multiarc function *MAF*(**Prim.P2, Prim.T2**) = <y> and thus the set *TransitionInputVariables*(**Prim.T2**) = {a, y}. And again, we can easily determine that for the input multiarc (**Prim.P2, Prim.T2**) there exists mapping *InputBind*: <a> <1>, and thus holds that *InputBind*(a) = 1. With that input multiarc it is also necessary to determine the mapping *InputBind*: *MAF*(**Prim.P2**, **Prim.T2**) e, where *e M*(*OPF*(**Prim.P2**, **Prim.T2**)). The

mapping *OutputBind* applied to various values of the arc sequence *AS*.

if *AS* = <a>, then *OutputBind*(<a>) = *OB*(a) = <*InputBind*(a)> = <10>.

if *AS* = <x, a, 5>, then *OutputBind*(<x, a, 5>) = *OB*(x) *OB*(a) *OB*(5) =

 if *AS* = <#x, a, 5>, then *OutputBind*(<#x, a, 5>) = *OB*(#x) *OB*(a) *OB*(5) = *InputBind*(#x)<*InputBind*(a)><5> = <1, 2, 3><10><5> = <1, 2, 3, 10, 5>.

*InputBind*(b)\*(*InputBind*(#x)) = 2\*(<1, 2, 3>) = <1, 2, 3><1, 2, 3> =

<@(<<1, 2, 3>><10><5>)> = <@(<<1, 2, 3>, 10, 5>)> = <3>.

**Figure 6.** Marking of sequential object Petri net

<*InputBind*(x)><*InputBind*(a)><5> = <<1, 2, 3>><10><5> = <<1, 2, 3>, 10, 5>.

 if *AS* = <@(<x, a, 5>)>, then *OutputBind*(<@(<x, a, 5>)>) = <*OB*(@(<x, a, 5>))> = <@(*OB*(x) *OB*(a) *OB*(5))> = <@(<*InputBind*(x)><*InputBind*(a)>*OB*(5))> =

So it can be stated that for both transitions **Prim.T1** a **Prim.T2** exist particular input bindings of all the transition input variables associated with their input arcs and thus, both transitions are enabled. We are further interested, if there exists the mapping *OutputBind* of the values of functions *AF* and *MAF* associated with output arcs (or multiarcs) of both transitions. With transition **Prim.T1** is associated the only output multiarc (**Prim.T1, Prim.P2**) whose value of the arc function *AF*(**Prim.T1, Prim.P2**) = <a> and the value of the multiarc function *MAF*(**Prim.T1, Prim.P2**) = <a>. So we can easily find out that *OutputBind*(<a>) = <2>. With the transition **Prim.T2** is associated the only output arc (**Prim.T2, Prim.In**) whose value of the arc function *AF*(**Prim.T2, Prim.In**) = <a, y>. So again, we can easily find out that *OutputBind*(<a, y>) = <1, 3>.

Let *SOPN =* (, *PN*) is a sequential object Petri net, *PG* is a net page, *t T* is a transition of the net page *PG*, *M* is a marking of the net *SOPN*.


Firing of transition will result in the new marking of given sequential object Petri net, which we will obtain as follows:


 from each output place of page *q*, being the value of function *OPF* of the input multiarc (*p*, *t*) of the fired transition *t*, we will remove the (unique) token in the marking *M*, bound to the value of the multiarc function *MAF*(*p*, *t*),

Sequential Object Petri Nets and the Modeling of Multithreading Object-Oriented Programming Systems 209

 if *p* is place and *t* transition of the given net page and (*t, p*) its multiarc whose value of arc function equals to *AF*(*t, p*), the value of input place function equals to *IPF*(*t, p*) and the value of multiarc function equals to *MAF*(*t, p*), we substitute that multiarc with

by the arc (*t, p*) with the value of the arc function equal to *AF*(*t, p*),

multiarc (**Prim.T1, Prim.P2**) was substituted by the following pair of arcs:

multiarc (**Prim.P2, Prim.T2**) was substituted by the following pair of arcs:

by the arc (*t, IPF*(*t, p*)) with the value of the arc function equal to *MAF*(*t, p*).

 the arc (**Prim.T1, Prim.P2**) with the value of the arc function *AF* equal to <a>, the arc (**Prim.T1, Sub.first**) with the value of the arc function *AF* equal to <a>,

 the arc (**Prim.P2, Prim.T2**) with the value of the arc function *AF* equal to <a>, the arc (**Sub.First, Prim.T2**) with the value of the arc function *AF* equal to <y>.

When enabling individual steps of the sequential object Petri net, so called *conflicts* can originate in certain markings of the net (or *conflict transitions*). At the enabling of transitions *t1* and *t2* of the given net and its marking *M* the conflict occurs, if both transitions *t1* and *t2* have at least one input place, each of *t1* and *t2* transitions is individually enabled in the marking *M* of the net, but *t1* and *t2* transitions are not in that marking *M* concurrently enabled, i.e. enabling of one of them will prevent enabling the other. The term of conflict transitions can be obviously easily generalized for the case of finite set *t1*, *t2*, …, *tn* (*n N*) of

A typical example of the conflict at enabling transitions in the particular marking of the net is shown in Figure 9, where transitions **T1** and **T2** of the net have a common input place **P1**, both are enabled (particular binding of tokens can be easily found), but not concurrently enabled, i.e. enabling of the transition **T1** will disable enabling of the transition **T2** and vice versa. When solving conflicts at enabling of transitions in sequential Petri nets we will therefore follow the rule which determines, informally said, that from the set of conflict transitions at the given binding of tokens the one will be enabled, whose value of transition priority function *TP* is the highest. If such transition from the set of conflict transitions does not exist, the given conflict would have to be solved by other means. In our studied example will be then on the basis of

that rule the transition **T2** enabled (because *TP*(**T1**) = 1 and *TP*(**T2**) = 2).

That notional substitution of multiarcs in the previous net is shown in Figure 8 where:

notional pair of the following standard arcs:

**Figure 8.** Substitution of multiarcs in sequential object Petri net

transitions of the given net.


Figure 6 shows the net pages **Prim** and **Sub** of a certain sequential object Petri net in its marking *M*. From previous text we know that transitions **Prim.T1** and **Prim.T2** are **concurrently enabled.** Hence, firing of transition **Prim.T1** consists in:


Hence, firing of transition **Prim.T2** consists in:


Marking M' of the net after concurrent firing of transitions **Prim.T1** and **Prim.T2** is shown in Figure 7.

**Figure 7.** Firing of transitions in sequential object Petri net

Relatively complicated mechanism of firing of transitions in sequential object Petri nets can be better explained by notional substituting of all the multiarcs of the net by standard arcs, which can be realized as follows:

	- by the arc (*p, t*) with the value of the arc function equal to *AF*(*p, t*),
	- by the arc (*OPF*(*p, t*)*, t*) with the value of the arc function equal to *MAF*(*p, t*).
	- by the arc (*t, p*) with the value of the arc function equal to *AF*(*t, p*),

208 Petri Nets – Manufacturing and Computer Science

function *OutputBind*(*MAF*(*t, p*)),

 adding token <2> to the place **Prim.P2**, adding token <2> to the input place **Sub.first**.

Hence, firing of transition **Prim.T2** consists in:

Figure 7.

removing token <1> from the place **Prim.P2**,

**Figure 7.** Firing of transitions in sequential object Petri net

notional pair of the following standard arcs:

which can be realized as follows:

 removing token <3> from the output place **Sub.First**, adding token <1, 3> to the output place **Prim.In**.

bound to the value of the multiarc function *MAF*(*p*, *t*),

 from each output place of page *q*, being the value of function *OPF* of the input multiarc (*p*, *t*) of the fired transition *t*, we will remove the (unique) token in the marking *M*,

 to each input place of page *q*, being the value of function *IPF* of the output multiarc (*t*, *p*) of fired transition *t*, we will add up the (unique) token being the value of partial

Figure 6 shows the net pages **Prim** and **Sub** of a certain sequential object Petri net in its marking *M*. From previous text we know that transitions **Prim.T1** and **Prim.T2** are

Marking M' of the net after concurrent firing of transitions **Prim.T1** and **Prim.T2** is shown in

Relatively complicated mechanism of firing of transitions in sequential object Petri nets can be better explained by notional substituting of all the multiarcs of the net by standard arcs,

 if *p* is place and *t* transition of the given net page and (*p, t*) its multiarc whose value of arc function equals to *AF*(*p, t*), the value of output place function equals to *OPF*(*p, t*) and the value of multiarc function equals to *MAF*(*p, t*), we substitute this multiarc by

by the arc (*OPF*(*p, t*)*, t*) with the value of the arc function equal to *MAF*(*p, t*).

by the arc (*p, t*) with the value of the arc function equal to *AF*(*p, t*),

in all the remaining places of the net we will leave their original marking.

**concurrently enabled.** Hence, firing of transition **Prim.T1** consists in:

removing token <2> from the input place **Prim.in**,

by the arc (*t, IPF*(*t, p*)) with the value of the arc function equal to *MAF*(*t, p*).

That notional substitution of multiarcs in the previous net is shown in Figure 8 where:

	- the arc (**Prim.T1, Prim.P2**) with the value of the arc function *AF* equal to <a>,
	- the arc (**Prim.T1, Sub.first**) with the value of the arc function *AF* equal to <a>,
	- the arc (**Prim.P2, Prim.T2**) with the value of the arc function *AF* equal to <a>,
	- the arc (**Sub.First, Prim.T2**) with the value of the arc function *AF* equal to <y>.

**Figure 8.** Substitution of multiarcs in sequential object Petri net

When enabling individual steps of the sequential object Petri net, so called *conflicts* can originate in certain markings of the net (or *conflict transitions*). At the enabling of transitions *t1* and *t2* of the given net and its marking *M* the conflict occurs, if both transitions *t1* and *t2* have at least one input place, each of *t1* and *t2* transitions is individually enabled in the marking *M* of the net, but *t1* and *t2* transitions are not in that marking *M* concurrently enabled, i.e. enabling of one of them will prevent enabling the other. The term of conflict transitions can be obviously easily generalized for the case of finite set *t1*, *t2*, …, *tn* (*n N*) of transitions of the given net.

A typical example of the conflict at enabling transitions in the particular marking of the net is shown in Figure 9, where transitions **T1** and **T2** of the net have a common input place **P1**, both are enabled (particular binding of tokens can be easily found), but not concurrently enabled, i.e. enabling of the transition **T1** will disable enabling of the transition **T2** and vice versa. When solving conflicts at enabling of transitions in sequential Petri nets we will therefore follow the rule which determines, informally said, that from the set of conflict transitions at the given binding of tokens the one will be enabled, whose value of transition priority function *TP* is the highest. If such transition from the set of conflict transitions does not exist, the given conflict would have to be solved by other means. In our studied example will be then on the basis of that rule the transition **T2** enabled (because *TP*(**T1**) = 1 and *TP*(**T2**) = 2).

Sequential Object Petri Nets and the Modeling of Multithreading Object-Oriented Programming Systems 211

Static and non-static data items are on the net pages represented in the form of **tokens** in the given net marking, i.e. by elements of the set *Tokens*. When representing values of static and non-static data items being the elements of particular tokens of the net, it is for example

If the data type of the particular data item is a non-negative integer (*int*), its actual value

 If the data type of the particular data item is *boolean*, we represent the truth value *false* most frequently with constant 0 and the truth value *true* with constant 1, while in

 If the data type of the particular data item is *char*, whose value is the element of the set contained in the code table given by the Unicode standard, we represent its value corresponding to the value of the symbol code given in the Unicode Standard, i.e. the letter 'A' can be represented by the value 65. In order to make again layouts of nets more readable, the element of token can be entered as the particular symbol bounded by apostrophes, i.e. instead of token <65> we will indicate in layouts of nets token <'A'>. If the data type of the particular data item is *string*, whose value is text string, the values can be represented by sequences of codes of symbols according to the Unicode standard. Again, for better transparency of notations, it is possible to use instead of codes of symbols directly the sequence of symbols bounded by apostrophes, i.e. in layouts of nets represent data items of the data type *string* with the tokens of <'H', 'e', 'l', 'l', 'o'> shape, or to bound sequence of symbols of the string with quotation marks,

 Data items whose data type are numbers with floating decimal point (*float*, *double*), or other numerical data type being the superset of the set of non-negative integer numbers, it is not possible to declare it directly on the basis of the stated definition of the sequential object Petri net. If a need emerges to operate with those numerical sets during simulation of multithreading object-oriented programming system, it is always easy to extend in this sense the definition of the token, arc sequence and other particular definitions, in order to ensure the support of those numerical sets (e.g. it is possible to define the token of sequential

object Petri net as the finite non-empty sequence over the set of real numbers *R*, etc.). In the case of data items whose data type is the pointer to instance of class, we represent their values with natural numbers. Each instance of the class has at its creation allocated unique natural number expressing its address within the programming heap. Number 0

Static data items are usually represented in layouts of nets with the tokens containing only their actual values. Non-static data items are usually represented by tokens containing both the value of pointer to a given instance of the class in which the particular data item is declared, and its actual value according to particular data type. So if within the declaration

layouts of the net we are also using symbolic values *false* and *true*.

possible to proceed as follows:

equals to that non-negative integer.

i.e. to note the tokens in the form of <"Hello">.

than represents the value of pointer *null*.

 **private static boolean indicator = true;** 

**public class First {** 

**}** 

 **private char status = 'a';** 

of the class First for example the following data items are declared:

**Figure 9.** Conflict transitions in sequential object Petri net
