**3.** *k***-Petri net controlled grammars**

6 Petri Nets

An *ordinary net* (ON) is a Petri net *N* = (*P*, *T*, *F*, *φ*) where *φ*(*x*, *y*) = 1 for all (*x*, *y*) ∈ *F*. We

A mapping *μ* : *P* → **N**<sup>0</sup> is called a *marking*. For each place *p* ∈ *P*, *μ*(*p*) gives the number of *tokens* in *p*. Graphically, tokens are drawn as small solid *dots* inside circles. •*x* = {*y* | (*y*, *x*) ∈ *F*} and *x*• = {*y* | (*x*, *y*) ∈ *F*} are called *pre-* and *post-sets* of *x* ∈ *P* ∪ *T*, respectively. For *t* ∈ *T* (*p* ∈ *P*), the elements of •*t*(• *p*) are called *input* places (transitions) and the elements of *t*• (*p*•)

A transition *t* ∈ *T* is *enabled* by marking *μ* if and only if *μ*(*p*) ≥ *φ*(*p*, *t*) for all *p* ∈ •*t*. In this case *t* can *occur* (*fire*). Its occurrence transforms the marking *μ* into the marking *μ*� defined

enabled. A finite sequence *t*1*t*<sup>2</sup> ··· *tk*, *ti* ∈ *T*, 1 ≤ *i* ≤ *k*, is called *an occurrence sequence* enabled at a marking *<sup>μ</sup>* and finished at a marking *<sup>μ</sup><sup>k</sup>* if there are markings *<sup>μ</sup>*1, *<sup>μ</sup>*2,..., *<sup>μ</sup>k*−<sup>1</sup> such that

−→ *μ<sup>k</sup>* where *ν* = *t*1*t*<sup>2</sup> ··· *tk*. For each 1 ≤ *i* ≤ *k*, marking *μ<sup>i</sup>* is called *reachable* from marking

A *marked* Petri net is a system *N* = (*P*, *T*, *F*, *φ*, *ι*) where (*P*, *T*, *F*, *φ*) is a Petri net, *ι* is the *initial*

A Petri net *with final markings* is a construct *N* = (*P*, *T*, *F*, *φ*, *ι*, *M*) where (*P*, *T*, *F*, *φ*, *ι*) is a marked Petri net and *M* ⊆ R(*N*, *ι*) is set of markings which are called *final* markings. An occurrence sequence *ν* of transitions is called *successful* for *M* if it is enabled at the initial marking *ι* and finished at a final marking *τ* of *M*. If *M* is understood from the context, we say

A Petri net *N* is said to be *k*-*bounded* if the number of tokens in each place does not exceed a finite number *k* for any marking reachable from the initial marking *ι*, i.e., *μ*(*p*) ≤ *k* for all *p* ∈ *P* and for all *μ* ∈ R(*N*, *ι*). A Petri net *N* is said to be *bounded* if it is *k*-bounded for some

A Petri net with *place capacity* is a system *N* = (*P*, *T*, *F*, *φ*, *ι*, *κ*) where (*P*, *T*, *F*, *φ*, *ι*) is a marked Petri net and *κ* : *P* → **N**<sup>0</sup> is a function assigning to each place a number of maximal admissible tokens. A marking *μ* of the net *N* is valid if *μ*(*p*) ≤ *κ*(*p*), for each place *p* ∈ *P*. A transition

It is known that many decision problems are equivalent to the reachability problem [33], which has been shown to be decidable. However, it has exponential space complexity [40], thus from a practical point of view, Petri nets may be too powerful to be analyzed. The result of this has been the definition of a number of subclasses of Petri nets in order to find a subclass with a smaller complexity and still adequate modeling power for practical purposes. These subclasses are defined by restrictions on their structure intended to improve

their analyzability. We consider the following main structural subclasses of Petri nets.

*t* ∈ *T* is *enabled* by a marking *μ* if additionally the successor marking is valid.

*μ*. R(*N*, *μ*) denotes the set of all reachable markings from a marking *μ*.

(*p*) = *μ*(*p*) − *φ*(*p*, *t*) + *φ*(*t*, *p*). We write *μ*

*tk* −→ *<sup>μ</sup>k*. In short this sequence can be written as *<sup>μ</sup>*

*t*

. A marking *μ* is called *terminal* if in which no transition is

−→ *μ*� to indicate

*<sup>t</sup>*<sup>1</sup> *<sup>t</sup>*<sup>2</sup> ···*tk* −−−−→ *<sup>μ</sup><sup>k</sup>* or

omit *φ* from the definition of an ordinary net, i.e., *N* = (*P*, *T*, *F*).

are called *output* places (transitions) of *t*(*p*).

for each place *p* ∈ *P* by *μ*�

*μ <sup>t</sup>*<sup>1</sup> −→ *<sup>μ</sup>*<sup>1</sup>

*μ <sup>ν</sup>*

*marking*.

*k* ≥ 1.

**2.5 Special Petri nets**

that the firing of *t* in *μ* leads to *μ*�

*<sup>t</sup>*<sup>2</sup> −→ ... *tk*−<sup>1</sup> −−→ *<sup>μ</sup>k*−<sup>1</sup>

that *ν* is a successful occurrence sequence.

Since a context-free grammar and its derivation process can also be described by a Petri net (see [11]), where places correspond to nonterminals, transitions are the counterpart of the production rules, and the tokens reflect the occurrences of symbols in the sentential form, and there is a one-to-one correspondence between the application of (sequence of) rules and the firing of (sequence of) transitions, it is a very natural and very easy idea to control the derivations in a context-free grammar by adding some features to the associated Petri net. In this section we introduce a Petri net associated with a context-free grammar (i.e., a *context-free Petri net*), construct Petri net control mechanisms from cf Petri nets by adding new places, and define the corresponding grammars, called *k*-*Petri net controlled grammars*.

The construction of the following type of Petri nets is based on the idea of using similarity between the firing of a transition and the application of a production rule in a derivation in which places are nonterminals and tokens are separate occurrences of nonterminals.

**Definition 1.** A *context-free Petri net* (in short, a *cf Petri net*) w.r.t. a context-free grammar *G* = (*V*, Σ, *S*, *R*) is a septuple *N* = (*P*, *T*, *F*, *φ*, *β*, *γ*, *ι*) where


• the labeling function *ζ* : *P* ∪ *Q* → *V* ∪ {*λ*} is defined by *ζ*(*p*) = *β*(*p*) if *p* ∈ *P* and *ζ*(*p*) = *λ*

• the initial marking *<sup>μ</sup>*<sup>0</sup> is defined by *<sup>μ</sup>*0(*β*−1(*S*)) = 1 and *<sup>μ</sup>*0(*p*) = 0 for all *<sup>p</sup>* <sup>∈</sup> *<sup>P</sup>* <sup>∪</sup> *<sup>Q</sup>* <sup>−</sup>

**Definition 3.** A *k*-*Petri net controlled grammar* (*k-PN controlled grammar* for short) is a quintuple *G* = (*V*, Σ, *S*, *R*, *Nk*) where *V*, Σ, *S*, *R* are defined as for a context-free grammar and *Nk* is a

**Definition 4.** The *language* generated by a *k*-Petri net controlled grammar *G* consists of all

*<sup>S</sup> <sup>r</sup>*1*r*<sup>2</sup> ···*rn* ====<sup>⇒</sup> *<sup>w</sup>* where *<sup>t</sup>*1*t*<sup>2</sup> ··· *tn* <sup>=</sup> *<sup>γ</sup>*−1(*r*1*r*<sup>2</sup> ···*rn*) <sup>∈</sup> *<sup>T</sup>*<sup>∗</sup> is an occurrence sequence of the transitions of *Nk* enabled at the initial marking *ι* and finished

We denote the family of languages generated by *k*-PN controlled grammars (with erasing

*r*<sup>0</sup> : *S* → *A*1*B*1*A*2*B*2, *r*<sup>1</sup> : *A*<sup>1</sup> → *a*1*A*1*b*1, *r*<sup>2</sup> : *A*<sup>1</sup> → *a*1*b*1, *r*<sup>3</sup> : *B*<sup>1</sup> → *c*1*B*1, *r*<sup>4</sup> : *B*<sup>1</sup> → *c*1, *r*<sup>5</sup> : *A*<sup>2</sup> → *a*2*A*2*b*2, *r*<sup>6</sup> : *A*<sup>2</sup> → *a*2*b*2, *r*<sup>7</sup> : *B*<sup>2</sup> → *c*2*B*2, *r*<sup>8</sup> : *B*<sup>2</sup> → *c*<sup>2</sup>

and the corresponding 2-Petri net *N*<sup>2</sup> is given in Figure 2. Then it is easy to see that *G*<sup>2</sup>

*k*+1 ∏ *i*=1 *a ni <sup>i</sup> <sup>b</sup>ni i c ni i*

The following theorem presents the relations of languages generated by *k*-Petri net controlled

The next theorem shows that the language families generated by *k*-Petri net controlled

The closure properties of the language families generated by *k*-PN controlled grammars are

**Theorem 7.** *The family of languages* **PN***k, k* ≥ 1*, is closed under union, substitution, mirror image,*

<sup>2</sup> | *n*, *m* ≥ 1}.

<sup>2</sup> *and* **PN**[*λ*] *<sup>n</sup>* <sup>⊆</sup> **VEC**[*λ*]

, *n* ≥ 1.

Grammars Controlled by Petri Nets 345

1 *bn* 1 *cn* <sup>1</sup> *<sup>a</sup><sup>m</sup>* <sup>2</sup> *<sup>b</sup><sup>m</sup>* <sup>2</sup> *<sup>c</sup><sup>m</sup>*

*L* =

grammars to context-free, (positive) additive valence and vector languages.

*<sup>k</sup>*+1.

*intersection with regular languages and it is not closed under concatenation.*

*where k* ≥ 1 *and ni* ≥ 1, 1 ≤ *i* ≤ *k* + 1*, cannot be generated by a k-PN controlled grammar.*

, **aV**[*λ*] <sup>⊂</sup> **PN**[*λ*]

grammars form infinite hierarchy with respect to the numbers of additional places.

*Example* 2*.* Let *G*<sup>2</sup> be a 2-PN controlled grammar with the production rules:

*<sup>L</sup>*(*G*2) = {*a<sup>n</sup>*

• *τ* is the final marking where *τ*(*p*) = 0 for all *p* ∈ *P* ∪ *Q*.

*k*-PN with respect to the context-free grammar (*V*, Σ, *S*, *R*).

strings *w* ∈ Σ<sup>∗</sup> such that there is a derivation

*<sup>k</sup>* ), *k* ≥ 1.

if *p* ∈ *Q*,

{*β*−1(*S*)},

at the final marking *τ*.

rules) by **PN***<sup>k</sup>* (**PN***<sup>λ</sup>*

generates the language

**Theorem 4.** *The language*

**CF** <sup>⊂</sup> **PN**[*λ*]

**Theorem 6.** *For k* <sup>≥</sup> <sup>1</sup>*,* **PN**[*λ*]

given in the following theorem.

<sup>1</sup> <sup>⊆</sup> **pV**[*λ*]

*<sup>k</sup>* <sup>⊂</sup> **PN**[*λ*]

**Theorem 5.**

**Figure 1.** A cf Petri net *N*<sup>1</sup>


*Example* 1*.* Let *G*<sup>1</sup> be a context-free grammar with the rules:

$$r\_0: S \to AB, r\_1: A \to aAb, r\_2: A \to ab, r\_3: B \to cB, r\_4: B \to cB$$

(the other components of the grammar can be seen from these rules). Figure 1 illustrates a cf Petri net *<sup>N</sup>*<sup>1</sup> with respect to the grammar *<sup>G</sup>*1. Obviously, *<sup>L</sup>*(*G*1) = {*anbncm* <sup>|</sup> *<sup>n</sup>*, *<sup>m</sup>* <sup>≥</sup> <sup>1</sup>}.

The following proposition shows the similarity between terminal derivations in a context-free grammar and successful occurrences of transitions in the corresponding cf Petri net.

**Proposition 3.** *Let N* = (*P*, *T*, *F*, *φ*, *ι*, *β*, *γ*) *be the cf Petri net with respect to a context-free grammar <sup>G</sup>* = (*V*, <sup>Σ</sup>, *<sup>S</sup>*, *<sup>R</sup>*)*. Then S <sup>r</sup>*1*r*2···*rn* ====<sup>⇒</sup> *w, w* <sup>∈</sup> <sup>Σ</sup><sup>∗</sup> *is a derivation in G iff t*1*t*<sup>2</sup> ··· *tn, <sup>ι</sup> <sup>t</sup>*<sup>1</sup> *<sup>t</sup>*<sup>2</sup> ···*tn* −−−−→ *<sup>μ</sup>n, is an occurrence sequence of transitions in N such that γ*(*t*1*t*<sup>2</sup> ··· *tn*) = *r*1*r*<sup>2</sup> ···*rn and μn*(*p*) = 0 *for all p* ∈ *P.*

Now we define a *k*-*Petri net*, i.e., a cf Petri net with additional *k* places and additional arcs from/to these places to/from transitions of the net, the pre-sets and post-sets of the additional places are disjoint.

**Definition 2.** Let *G* = (*V*, Σ, *S*, *R*) be a context-free grammar with its corresponding cf Petri net *N* = (*P*, *T*, *F*, *φ*, *β*, *γ*, *ι*). Let *k* be a positive integer and let *Q* = {*q*1, *q*2,..., *qk*} be a set of new places called *counters*. A *k-Petri net* is a construct *Nk* = (*P* ∪ *Q*, *T*, *F* ∪ *E*, *ϕ*, *ζ*, *γ*, *μ*0, *τ*) where


**Definition 3.** A *k*-*Petri net controlled grammar* (*k-PN controlled grammar* for short) is a quintuple *G* = (*V*, Σ, *S*, *R*, *Nk*) where *V*, Σ, *S*, *R* are defined as for a context-free grammar and *Nk* is a *k*-PN with respect to the context-free grammar (*V*, Σ, *S*, *R*).

**Definition 4.** The *language* generated by a *k*-Petri net controlled grammar *G* consists of all strings *w* ∈ Σ<sup>∗</sup> such that there is a derivation

$$S \xrightarrow{r\_1 r\_2 \cdots r\_n} w \text{ where } t\_1 t\_2 \cdots t\_n = \gamma^{-1} (r\_1 r\_2 \cdots r\_n) \in T^\*$$

is an occurrence sequence of the transitions of *Nk* enabled at the initial marking *ι* and finished at the final marking *τ*.

We denote the family of languages generated by *k*-PN controlled grammars (with erasing rules) by **PN***<sup>k</sup>* (**PN***<sup>λ</sup> <sup>k</sup>* ), *k* ≥ 1.

*Example* 2*.* Let *G*<sup>2</sup> be a 2-PN controlled grammar with the production rules:

$$\begin{array}{llll} r\_0: S \to A\_1B\_1A\_2B\_2, & r\_1: A\_1 \to a\_1A\_1b\_{1\prime} & r\_2: A\_1 \to a\_1b\_{1\prime} \\ r\_3: B\_1 \to c\_1B\_1, & r\_4: B\_1 \to c\_1, & r\_5: A\_2 \to a\_2A\_2b\_{2\prime} \\ r\_6: A\_2 \to a\_2b\_{2\prime} & r\_7: B\_2 \to c\_2B\_2, & r\_8: B\_2 \to c\_2 \end{array}$$

and the corresponding 2-Petri net *N*<sup>2</sup> is given in Figure 2. Then it is easy to see that *G*<sup>2</sup> generates the language

$$L(G\_2) = \{a\_1^n b\_1^n c\_1^n a\_2^m b\_2^m c\_2^m \mid n, m \ge 1\}.$$

**Theorem 4.** *The language*

$$L = \prod\_{i=1}^{k+1} a\_i^{n\_i} b\_i^{n\_i} c\_i^{n\_i}$$

*where k* ≥ 1 *and ni* ≥ 1, 1 ≤ *i* ≤ *k* + 1*, cannot be generated by a k-PN controlled grammar.*

The following theorem presents the relations of languages generated by *k*-Petri net controlled grammars to context-free, (positive) additive valence and vector languages.

#### **Theorem 5.**

8 Petri Nets

•

• there is an arc from transition *t* to place *p* if and only if *γ*(*t*) = *A* → *α* and *β*(*p*) = *x* where

*r*<sup>0</sup> : *S* → *AB*, *r*<sup>1</sup> : *A* → *aAb*, *r*<sup>2</sup> : *A* → *ab*, *r*<sup>3</sup> : *B* → *cB*, *r*<sup>4</sup> : *B* → *c* (the other components of the grammar can be seen from these rules). Figure 1 illustrates a cf Petri net *<sup>N</sup>*<sup>1</sup> with respect to the grammar *<sup>G</sup>*1. Obviously, *<sup>L</sup>*(*G*1) = {*anbncm* <sup>|</sup> *<sup>n</sup>*, *<sup>m</sup>* <sup>≥</sup> <sup>1</sup>}.

The following proposition shows the similarity between terminal derivations in a context-free

**Proposition 3.** *Let N* = (*P*, *T*, *F*, *φ*, *ι*, *β*, *γ*) *be the cf Petri net with respect to a context-free grammar*

*occurrence sequence of transitions in N such that γ*(*t*1*t*<sup>2</sup> ··· *tn*) = *r*1*r*<sup>2</sup> ···*rn and μn*(*p*) = 0 *for all*

Now we define a *k*-*Petri net*, i.e., a cf Petri net with additional *k* places and additional arcs from/to these places to/from transitions of the net, the pre-sets and post-sets of the additional

**Definition 2.** Let *G* = (*V*, Σ, *S*, *R*) be a context-free grammar with its corresponding cf Petri net *N* = (*P*, *T*, *F*, *φ*, *β*, *γ*, *ι*). Let *k* be a positive integer and let *Q* = {*q*1, *q*2,..., *qk*} be a set of new places called *counters*. A *k-Petri net* is a construct *Nk* = (*P* ∪ *Q*, *T*, *F* ∪ *E*, *ϕ*, *ζ*, *γ*, *μ*0, *τ*)

• the weight function *ϕ*(*x*, *y*) is defined by *ϕ*(*x*, *y*) = *φ*(*x*, *y*) if (*x*, *y*) ∈ *F* and *ϕ*(*x*, *y*) = 1 if

<sup>1</sup> <sup>∩</sup> *<sup>T</sup><sup>j</sup>*

<sup>2</sup>, 1 <sup>≤</sup> *<sup>i</sup>* <sup>≤</sup> *<sup>k</sup>*} such that *<sup>T</sup><sup>i</sup>*

<sup>2</sup> <sup>=</sup> <sup>∅</sup> for 1 <sup>≤</sup> *<sup>i</sup>* <sup>&</sup>lt; *<sup>j</sup>* <sup>≤</sup> *<sup>k</sup>* and *<sup>T</sup><sup>i</sup>*

*<sup>t</sup>*<sup>1</sup> *<sup>t</sup>*<sup>2</sup> ···*tn* −−−−→ *<sup>μ</sup>n, is an*

<sup>1</sup> <sup>⊂</sup> *<sup>T</sup>* and *<sup>T</sup><sup>i</sup>*

<sup>2</sup> ⊂ *T*,

<sup>1</sup> = ∅ if

grammar and successful occurrences of transitions in the corresponding cf Petri net.

*<sup>G</sup>* = (*V*, <sup>Σ</sup>, *<sup>S</sup>*, *<sup>R</sup>*)*. Then S <sup>r</sup>*1*r*2···*rn* ====<sup>⇒</sup> *w, w* <sup>∈</sup> <sup>Σ</sup><sup>∗</sup> *is a derivation in G iff t*1*t*<sup>2</sup> ··· *tn, <sup>ι</sup>*

<sup>1</sup>, 1 <sup>≤</sup> *<sup>i</sup>* <sup>≤</sup> *<sup>k</sup>*}∪{(*qi*, *<sup>t</sup>*) <sup>|</sup> *<sup>t</sup>* <sup>∈</sup> *<sup>T</sup><sup>i</sup>*

*<sup>l</sup>* <sup>=</sup> <sup>∅</sup> for 1 <sup>≤</sup> *<sup>l</sup>* <sup>≤</sup> 2, *<sup>T</sup><sup>i</sup>*

• the initial marking *<sup>ι</sup>* is defined by *<sup>ι</sup>*(*β*−1(*S*)) = 1 and *<sup>ι</sup>*(*p*) = 0 for all *<sup>p</sup>* <sup>∈</sup> *<sup>P</sup>* − {*β*−1(*S*)}.

**Figure 1.** A cf Petri net *N*<sup>1</sup>

*p* ∈ *P.*

where

places are disjoint.

• *<sup>E</sup>* <sup>=</sup> {(*t*, *qi*) <sup>|</sup> *<sup>t</sup>* <sup>∈</sup> *<sup>T</sup><sup>i</sup>*

and only if *T<sup>i</sup>*

(*x*, *y*) ∈ *E*,

<sup>1</sup> <sup>≤</sup> *<sup>i</sup>* <sup>≤</sup> *<sup>k</sup>* where *<sup>T</sup><sup>i</sup>*

*<sup>l</sup>* <sup>∩</sup> *<sup>T</sup><sup>j</sup>*

<sup>2</sup> = ∅ for any 1 ≤ *i* ≤ *k*.


*Example* 1*.* Let *G*<sup>1</sup> be a context-free grammar with the rules:

$$\mathbf{CF} \subset \mathbf{PN}\_1^{[\lambda]} \subseteq \mathbf{p} \mathbf{V}^{[\lambda]}, \; \mathbf{a} \mathbf{V}^{[\lambda]} \subset \mathbf{PN}\_2^{[\lambda]} \; and \; \mathbf{PN}\_n^{[\lambda]} \subseteq \mathbf{VEC}^{[\lambda]}, n \ge 1.$$

The next theorem shows that the language families generated by *k*-Petri net controlled grammars form infinite hierarchy with respect to the numbers of additional places.

$$\mathbf{Theorem 6. For } k \ge 1, \mathbf{PN}\_k^{[\lambda]} \subset \mathbf{PN}\_{k+1}^{[\lambda]}.$$

The closure properties of the language families generated by *k*-PN controlled grammars are given in the following theorem.

**Theorem 7.** *The family of languages* **PN***k, k* ≥ 1*, is closed under union, substitution, mirror image, intersection with regular languages and it is not closed under concatenation.*

grammars since we have three different types of correspondence and three types of the set of admitted occurrence sequences. These types of control are generalizations of those types of control considered in the previous chapter, too, where instead of arbitrary Petri nets only such Petri nets have been considered where the places and transitions correspond in a one-to-one

**Definition 5.** An *arbitrary Petri net controlled grammar* is a tuple *G* = (*V*, Σ, *S*, *R*, *N*, *γ*, *M*) where *V*, Σ, *S*, *R* are defined as for a context-free grammar and *N* = (*P*, *T*, *F*, *ϕ*, *ι*) is a (marked) Petri

**Definition 6.** The *language* generated by a Petri net controlled grammar *G*, denoted by *<sup>L</sup>*(*G*), consists of all strings *<sup>w</sup>* <sup>∈</sup> <sup>Σ</sup><sup>∗</sup> such that there is a derivation *<sup>S</sup> <sup>r</sup>*1*r*2···*rk* ====<sup>⇒</sup> *<sup>w</sup>* <sup>∈</sup> <sup>Σ</sup><sup>∗</sup> and an occurrence sequence *ν* = *t*1*t*<sup>2</sup> ··· *ts* which is successful for *M* such that *r*1*r*<sup>2</sup> ···*rk* =

*Example* 3*.* Let *G*<sup>3</sup> = ({*S*, *A*, *B*, *C*}, {*a*, *b*, *c*}, *S*, *R*, *N*3, *γ*, *M*) be a Petri net controlled grammar

*A* → *aA*, *B* → *bB*, *C* → *cC*, *A* → *a*, *B* → *b*, *C* → *c* and *N*<sup>3</sup> is illustrated in Figure 3. If *M* is the set of all reachable markings, then *G*<sup>3</sup> generates

*<sup>L</sup>*(*G*3) = {*anbmck* <sup>|</sup> *<sup>n</sup>* <sup>≥</sup> *<sup>m</sup>* <sup>≥</sup> *<sup>k</sup>* <sup>≥</sup> <sup>1</sup>}.

*<sup>L</sup>*(*G*3) = {*anbncn* <sup>|</sup> *<sup>n</sup>* <sup>≥</sup> <sup>1</sup>}.

→ → →

Different labeling strategies and different definitions of the set of final markings result in various types of Petri net controlled grammars. We consider the following types of Petri net

**Definition 7.** A Petri net controlled grammar *G* = (*V*, Σ, *S*, *R*, *N*, *γ*, *M*) is called *free* (abbreviated by *f*) if a different label is associated to each transition, and no transition is labeled with the empty string; *λ*-*free* (abbreviated by −*λ*) if no transition is labeled with the empty string; *extended* (abbreviated by *λ*) if no restriction is posed on the labeling function *γ*.

→ → →

Grammars Controlled by Petri Nets 347

net, *γ* : *T* → *R* ∪ {*λ*} is a transition labeling function and *M* is a set of final markings.

manner to nonterminals and rules, respectively.

*γ*(*t*1*t*<sup>2</sup> ··· *ts*).

the language

• <sup>→</sup>

**Figure 3.** A labeled Petri net *N*<sup>3</sup>

controlled grammars.

where *R* consists of

We now introduce the concept of control by an arbitrary Petri net.

*S* → *ABC*,

If *M* = {*μ*} with *μ*(*p*) = 0 for all *p* ∈ *P*, then it generates the language

**Figure 2.** A 2-Petri net *N*<sup>2</sup>
