• Tidak ada hasil yang ditemukan

These extensions are particularly useful to model and analyze real time systems and protocols

N/A
N/A
Protected

Academic year: 2023

Membagikan "These extensions are particularly useful to model and analyze real time systems and protocols"

Copied!
24
0
0

Teks penuh

(1)

/,,,,, 11M, ,....'" (""~I' (""'(1'1' Ih~·I~H.I"IIHA,H II~HHA.D.)

TOWARDS AN EXPERT SYSTEM TO ANALYZE PETRI NET MODELS FOR REAL-TIME SYSTEMS AND COMMUNICATION PROTOCOLS

M. REDA ELKARAKSY and M. BENMAIZA College of Computer and Information Sciences

KSU, P.O. BOX 51178, RIYADH 11543.

ABSTRACT

This paper serves two purposes:first it gives an overview of Petri Net (P-NetJ models for real-time systems and communi- cation protocols, and second it highlights a research work now being carried out, at the College of Computer and Infor- mation Sceiences of KSU, to develop an Expert System capable of analysing such models.

Formal definition of a P-Net is first introduced. Two particular extensions are pointed to; Timed P-Nets, and Predicate/Action P-Nets. These extensions are particularly useful to model and analyze real time systems and protocols. A survey of the main results as for analyzing p_Nets is given, using the reachability and invariants methods.

We next introduce a developed expert system capable of ilnalyzing P-Net models using the reachability method. The system combines both computational and cognition capabili- ties. It combines computational routines in Pascal to build the trse, and logical reasoning with the knowledge base in Prolog, in addition to graphics capabilities.

KEYWORDS: Petri Nets, Analysis, Expert System, Real Time, Protocols.

1. Introduction

Our aim by conducting the present reseilrch work is to deve- lop tools and aids to model and analyze real-time and commu- nication prorocol systems using P-Net5 and extended P-Nets.

What is needed is a sophisticated package with graphics capabilities (hopefUlly, a full born expert system) to run on PCs, capable of modeling and analyzing such systems.

A formal definition of P-Nets using a simple uninter- preted example is given in section 2. Section 3 introduces general p-Net properties related to its structure. A good model should exhibit both expressiveness and powerful analy- sis capabilities. P-Nets have been extended in a variety of ways to enhance its modeling power; we introduce two such exrensions useful to our purpose timed P-Nets, and predi- cate/action P-Nets.

(2)

M1<.,£/ Kar/J.,ky and M, HenM",,~

Section 4 surveys and summarizes main results as for analyzing P-Nets for communication protocols. Two main approachs are emphasized reachability and invariants methods.

Basic features and characteristics of expert systems ace introduced in section 5. We next present in section II an implementation of an expert system capable of analyzing P-Net models. using the reachability approach. to check for a diversity of a modeled system's properties. Finally ...e conclude by pointing to future extensions and goals.

2. Petri Nets As A Modeling Tool

Petri Nets (P-Nets) are used as a modeling tool to describe and analyze systems that exhibit asynchronous and concurrent features [1.2]. I t is uEled, specitically, to describe and model the class of discrete event systems with concurrent or parallel events. Two particular aspects are mOdeled events and conditions and the relationships among them.

A simple example at two cooperating processes is sho....n if Fig.l, where process I is producing items which is con- sumed by process 2. A P-Net ie composed of places (circles) and transitions (bare). Transitions may represent possible events. while places may represent states of interest.

Places and transitions are primitive concepts of P-Nets. A marking of a P-Nst is an assignment of tokenf; to the places 1n that net; a token if; another primitive concept of P-Nets.

A P-nst executee by firing transitions. The number of tokens and their position in a P-Net may change during execution and When places are assigned tokens. the result is a marked P-Net. A, transition may fire i f its input places have the proper number of toltens in it (indicated by number- ing the input arcs to a transition). A transition fires by removinq a number of toltens (indicated by a number attached to its input a~cs) from eac~ of its input places. Note that the model in Fig.l needs to consume two items at a time (indicated by the arc from P3 to t) being labeled 2).

An arc with no label implies a label of 1.

The example in Fig.l Clearly indicates in an obvious way the following features of both Ule P-Net model and the sys- tem that is modeled <;;oncurrancy or parallelism, asynchro- nous nature. and nondetsrminism in P-Net execution.

A P-Net graph is a bipartite directed graph; bipartite since its nodes are partitioned into two sets places and transitions. A P_Net is a tuple [ P, T. F, Bj where:

(3)

P i6 a set of places (P

I

O),

T 16 a set of transitions (T ~

°

and PA T • Ol.

F: PxT ... N, a forward incidence function (N being- the set of integ-ers).

B: PxT - . N. a backward incidence function.

There is an arc from place Pk to transition P(Pk.ti) nk{! 0; the corresponding arc from ti is labeled by the value nki called "weight".

q i f f

Pk to

Similarly, E{PI,qJ arc.

there nlj

is an arc from ti

I 0; nlj is

to P 1

'h,

weightiff of that

For a given P-Net.

for tU.Pre(t) = ip~P/F(P. t) f

o}

where Pre(t) is the set of input places at transition t.

fat tET, Post(t) tpe:P/B{p. t)

1 01

where POSt(t) is the set ot output places of transition t.

A marking U at a p_Net is a mapping of the set of places p i n t o N; U(Pil=Ui. the marking of place Pi' An inte- qer number O[ marks. called tokens. are allowed to exist in places. A marked p-Net becomes the tuple {P, T. F. B.

U). where U is the vector that gives for each place in that net the number of tokens in that place.

Foc the p-Net in Fig.l:

p

t

PI' P,. P3 . P, • Ps·

pc}

T • t t l ' t , . t 3 •

"

}

[~

0 0

!l

t'

,< 'h,

matrix 1 0 0 2 0 0 0 1

1 0

where

row repre6ents

place and a column repre- senc:s

transition.

From the F matrix. for example. F(P3.t3) F(P6.t2) ,,'1 .

Likewise, the B matrix is:

ri

LO

i a !

1

I]

0

Z. and

(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
(24)

Referensi

Dokumen terkait