This section discusses rules for nets with SMEs, Since Sl\ffi manifests a new structure, new rules are required for IT generations within an SME and among Sl\ffis to maintain the completeness of the knitting rules. There are three cases of IT-generations, namely. within an Sl\ffi, between two Sl\ffis and between an Sl\ffi and an well-behavedness. The synchronic distance among PSPs in LEXI or LEX2 is, however, no longer infinite. We teno such LEXI and LEX2 as Sl\ffil and Sl\ffi2 respectively. Thus an Sl\ffi is not only a teno indicating a specific behavior, but also a set of PSPs that are mutually exclusive but sequentialized with each other, having a finite synchronic distance. In other words, no process in Sl\ffi, unlike PSPs in an LEX, can fire infinitely without firing any other processes in the Sl\ffi. Rule IT. 3 may be relaxed. In other words, not all PSPs in Sl\ffi 1 or Sl\ffi2 may participate in the generation.
With synchronic distance d
=
00, this may createdeadlocks or unbounded places since tg and t} may neverexecute which is not true for finite d.
Relaxing Rule IT.3 creates new rules and also generates more classes of nets, allowing us to uncover more aspects behind well-behaved nets and enhancing the. approach of synthesis-based analysis. In the rest of this paper, whether Rule IT.3 is relaxed or not, we uniformly say that the IT-generations are applied from Xgf to ~g.
Therefore, when Rule IT.3 is relaxed, Xgf (Xjg),
changing its original meaning somewhat, may not equal Sl\ffil (Sl\ffi2).
PSPs in both Sl\ffi 1 and Sl\ffi2 are executed
~
..
~. .t~ -ftftt~+=~sequentially and some IT-path within the generation may be a backward one. We need to detennine whether and how many tokens need to be added. As a result, a new DFC is discovered.
A. TT-Generations within An SME
In this subsection, we study the first case, i.e., the IT-generations within an SME and. its Rule IT.2, backward generation entails tokens inserted into
n
w. The difference is that insertion of a single token may not avoid the deadlock. An 12 II. the marking is (0,1,3,0,0,0). The deadlock can be removed by adding one more token to Ps which enables 12 to fire, removing the token trapped in PJ.In general, the least number of tokens to be inserted depends on the maximum marking at both the decision place and Ps which determines
d;g.
which is a generalized version of the DFC in [ZHO 91c]. Note that nW corresponds to the marking in Ps,
d;g
to that inPc,
and MAX[M<Po)] to that in the shared resource place (i.e., robot).Calculating
d;g
and MAXiM(PD )] is, in general, a reachability problem. It is, however, not so for synthesized nets because we calculate them in an incremental fashion. Upon each new generation,d;g
is determined whenthe
corresponding SME is first formed and equalsthe
number of tokens inserted inton
w. MAX[M(po)]Proof: MAX(M(PD» can be achieved by disabling all output transitions of PD and continue firing transitions in the PN until no more transitions
are
firable. Only those tokens in home places Phi which are 'SE' to PD can flow to PD. Because Phi
are
'CN' to each other, the maximum tokens c
that
can flow to PD is the minimum marking of all such Phi·KNITTING TECHNIQUE AND STRUCTURAL MATRIX FOR DEADLOCKANAL YSIS AND SYNTHESIS OF PETRI NETS WITH SEQUENTIAL EXCLUSION/Daniel
Y.
Chao 67be live even if all tokens in
n
W bave been to a deadlock and no longer reversible. The above trapping stops when the marking of the C-placeIn the C·place are consumed, there must be at least one token in PD. TIlUS we have condition as we can assume the contra.ty and prove
N2
tbat is deadlocked. Note tbat prior to the sequentialization, an SME is an LEX. We first define the full and partial SME as follows : Definition (Full SME, Partial SME) : If all the control transitions of a decision place are 'SX' to eacb other, the SME is a full SME; otherwise it is a partial SME.
For the TT-generation between an SMEILEX and another SMEILEX, wben the SME is partial, tbat is, the exclusive processes· are not all syncllronized, there is no ordering of executions of PSPs in the SME and other PSPs corresponding to the same decision place, PD. As a consequence, tg (fj) SME are exclusive to eacb other, it seems tbat Rule TT.3 is still applicable. The only difference is that not all PSPs in the SME may be involved in the
68 1l~~~ ~-tM
-fLJL-tlf.t=J=J
generation. Consider two SMEs, each containing a pair of PSPs with synchronic distance d
=
1. In to avoid deadlock, and no persistent accumulation of tokens in the NP, to avoid unboundedness.Based on this, we have the following:
Lemma 9 : After a IT-generation between two full SMEs, the necessary condition for preserving well
U u· number of times; implying that the synthesized net has a deadlock. Hence the necessary condition for preserving well-behavedness is k = O.
We then discuss the following two cases of synchronic distances among PSPs in an SME, (l) d
=
1 and (2) d> 1. then Rule IT.3 cannot be relaxed.Proof : Consider the IT-generation from a PSP,
KNITTING TECHNIQUE AND STRUCTURAL MATRIX FOR DEADLOCKANAL YSIS AND SYNTHESIS OF PETRI NETS WITH SEQUENTIAL EXCLUSION/Daniel Y. Chao 69
and X,g
= SME2. As will be shown later, this theorem also holds for the case when d> 1. The proof of Theorem 4 also leads to the following:Theorem 5 : If b/a is an integer, then applying Rule TT.3 by making Xg}
= n g
andX;g
a set containing arbitrary b PSPs of SME2 preservesa
Similarly,
we
have the following corollary : Corollary, 1 : If b is a factor of a, then applyingIn the above discussion, we consider only the case of Xg!" being only a PSP in SME1. We can apply such generation a number of times so that Xg, can have more than one PSP. Thus, 'for the rest of lemma helps one develop procedure token _ AddedO
2, .... r}. Thus, there is only one PSP in SME 1 involved in the generation. PSPs in SMEI executes one by one in the sequence of
n
gJ,n
g2 , ..•n
gaocoordinates with the execution of
n
fx to complete one iteration wherej~ = (x - 1)*
a + y. If}x > j~,70 jf~lWgiti ~-tWJ
-:fLfL-tiF+=fJ
Each time the deficiency of a token is detected, the integer variable "Token_Added" is incremented by one. At the end of the procedure,
"Token_Added" represents the total number of tokens to be added.
Similarly, procedure Token_AddedO for the case of -a being an integer exactly parallels that
b
.for the case of -h being an integer except the sign
a
change (from < to
»
in the "if' statement. We prove the correctness of the procedure as follows.Theorem 6: Procedure Token_AddedO calculates the minimum number of tokens to be added to
integer is similar. The procedure checks each
n.
.P
starting from x =
I.
Ifit cannot be executed and the synthesized net comes to a deadlock, then the procedure adds a token to the NP. At the end, the number of tokens added is the minimum. We then prove that the condition to add a.,token at the x-tb step isix
<[(x - 1 - Token':'Added) '" a + y] as shown in the procedure where "Token_Added" is a temporary variable indicating the minimum number of tokens to be added at the end of the Token_Added) times earlier than the execution ofn
i •. /.The (x - Token_Added)-th execution ofn
to'Thus, procedure token _AddedO determines the least number of tokens to be inserted to avoid
KNITTING 1ECHNIQUE AND STRUCTURAL MATRIX FOR DEADLOCKANAL YSIS AND SYNTHESIS OF PETRI NETS WITH SEQUENTIAL EXCLUSION/Daniel Y. Chao 71
have Y=
2,h
= I, and12 = 2. We start fromh (x.1). Initially, IT gl and IT/I must both execute to avoid deadlock. IT/I, however, cannot execute because IT 8
2
has not executed to inject a token into the NP. Thus, we add a token to the NP and set the variable token_Added 1. Next consider ITp(x ::: 2) and the token to be injected by executing we can apply the above algorithm to each set of { I process in SMEl, r processes in S:ME2}.
Case 2: d
>
1In this case, although the PSPs in SME I and SME2 do not execute alternatively, Theorem 3 still holds. The argument is as follows. Let d be the
IT.3
must be applied without relaxation.In the next section, we will apply the knitting technique to synthesize P:ME and S:ME.