framework for modeling and analysis of distributed problem-solving systems

10
Framework for modeling and analysis of distributed problem- solving systems G Uma, B E Prasad and P G Reddy Petri nets have the basic concepts necessary to model distributed systems with asynchronous processes. Petri nets are not directly applicable to certain kinds of systems like distributed intelligent systems ( DISs). These are com- plex systems where multiple intelligent agents cooperate through communication to achieve the solution to a problem. The paper identifies the limitations of ordinary Petri nets for modeling DISs and proposes extensions. The extended Petri net incorporates colored tokens, inhibition arcs, non-primitive places and transitions, multiple copies of tokens and cumulative places. It is called a distributed problem-solving Petri net. The definitions and analysis techniques are given and illustrated by means of an exam- pie. Keywords: analysis, colored tokens, cumulative places, deadlocks, distributed intelligent systems, DIPS Petri net, inhibition arcs, matrix equations, non-primitive places and transitions, place invariants, reachability trees (analysis), scientific-community metaphors Distributed artificial intelligence (DAI) refers to a subarea of AI that uses multiple processors. There is a collection of agents (logically distinct processing ele- ments) which are attempting to solve a problem. Although there are identifiable global states and goals, each agent has only a partial and inexact view of these. Each agent tries to recognise, predict and influence the global state such that its local view is satisfied. It com- putes solutions to a given subproblem and communicates results, tasks and goals to other agents. DAI has also been referred to as distributed problem AI Laboratory, Schoolof MCIS, Universityof Hyderabad,PO Central University, Hyderabad, India 500 134 Paper received 16 November 1990. Revisedpaper received23 October 1991. Accepted 19 December 1991 solving (DPS) [Deck87] and cooperative distributed problem solving (CDPS) [Durf89]. In this paper we refer to the terms DPS, CDPS and DAI interchangeably and a system using the DAI approach is referred to as a distri- buted intelligent system (DIS). By using DPS, one can have faster problem solving by exploiting parallelism, decreased communication costs, because only high level partial solutions need be transmitted between nodes rather than raw data, more flexibility by having nodes with different capabilities, and increased reliability because good nodes can take over the tasks of nodes that fail. Although distributed agents have greater difficulties solving a given task, they have potentially more options as well. A single agent problem solver must perform all planning itself. In a distributed system, an agent may plan or act, but it may also request others to do so, which results in speed through parallelism. In short, much of the power of DPS comes through cooperation and com- munication. To incorporate DISs into practice we need guidelines for building such systems. This can be done if we have tools to model and analyse the DISs that we build. Math- ematical models in the form of a set of equations are inadequate for modeling systems like DISs accurately. The issue of the modeling and performance analysis of DISs has not been adequately addressed. The few tech- niques for the analysis of normal distributed processing systems, such as queuing theory, are inadequate because they do not take into account the most important feature of DISs, that is, complex interaction among agents. Petri nets are formal models that are simple yet powerful in describing processes [Pete81]. Petri nets are designed spe- cifically to model systems that have interacting concur- rent components. The effectiveness of Petri nets in modeling DISs rests mainly on two points. Firstly, Petri nets are capable of modeling systems as independent and interactive subsystems. Secondly, Petri nets view a system in terms of conditions and events and such a view is appropriate for DISs as we shall see shortly. In this work we shall see why elementary Petri nets have to be Vol 5 No 4 December 1992 0950-7051/92/040295-10 © 1992 Butterworth-Heinemann Ltd 295

Upload: g-uma

Post on 26-Jun-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Framework for modeling and analysis of distributed problem-

solving systems

G Uma, B E Prasad and P G Reddy

Petri nets have the basic concepts necessary to model distributed systems with asynchronous processes. Petri nets are not directly applicable to certain kinds of systems like distributed intelligent systems ( DISs). These are com- plex systems where multiple intelligent agents cooperate through communication to achieve the solution to a problem. The paper identifies the limitations of ordinary Petri nets for modeling DISs and proposes extensions. The extended Petri net incorporates colored tokens, inhibition arcs, non-primitive places and transitions, multiple copies of tokens and cumulative places. It is called a distributed problem-solving Petri net. The definitions and analysis techniques are given and illustrated by means of an exam- pie.

Keywords: analysis, colored tokens, cumulative places, deadlocks, distributed intelligent systems, DIPS Petri net, inhibition arcs, matrix equations, non-primitive places and transitions, place invariants, reachability trees (analysis), scientific-community metaphors

Distributed artificial intelligence (DAI) refers to a subarea of AI that uses multiple processors. There is a collection of agents (logically distinct processing ele- ments) which are attempting to solve a problem. Although there are identifiable global states and goals, each agent has only a partial and inexact view of these. Each agent tries to recognise, predict and influence the global state such that its local view is satisfied. It com- putes solutions to a given subproblem and communicates results, tasks and goals to other agents.

DAI has also been referred to as distributed problem

AI Laboratory, School of MCIS, University of Hyderabad, PO Central University, Hyderabad, India 500 134 Paper received 16 November 1990. Revised paper received 23 October 1991. Accepted 19 December 1991

solving (DPS) [Deck87] and cooperative distributed problem solving (CDPS) [Durf89]. In this paper we refer to the terms DPS, CDPS and DAI interchangeably and a system using the DAI approach is referred to as a distri- buted intelligent system (DIS). By using DPS, one can have faster problem solving by exploiting parallelism, decreased communication costs, because only high level partial solutions need be transmitted between nodes rather than raw data, more flexibility by having nodes with different capabilities, and increased reliability because good nodes can take over the tasks of nodes that fail. Although distributed agents have greater difficulties solving a given task, they have potentially more options as well. A single agent problem solver must perform all planning itself. In a distributed system, an agent may plan or act, but it may also request others to do so, which results in speed through parallelism. In short, much of the power of DPS comes through cooperation and com- munication.

To incorporate DISs into practice we need guidelines for building such systems. This can be done if we have tools to model and analyse the DISs that we build. Math- ematical models in the form of a set of equations are inadequate for modeling systems like DISs accurately.

The issue of the modeling and performance analysis of DISs has not been adequately addressed. The few tech- niques for the analysis of normal distributed processing systems, such as queuing theory, are inadequate because they do not take into account the most important feature of DISs, that is, complex interaction among agents. Petri nets are formal models that are simple yet powerful in describing processes [Pete81]. Petri nets are designed spe- cifically to model systems that have interacting concur- rent components. The effectiveness of Petri nets in modeling DISs rests mainly on two points. Firstly, Petri nets are capable of modeling systems as independent and interactive subsystems. Secondly, Petri nets view a system in terms of conditions and events and such a view is appropriate for DISs as we shall see shortly. In this work we shall see why elementary Petri nets have to be

Vol 5 No 4 December 1992 0950-7051/92/040295-10 © 1992 Butterworth-Heinemann Ltd 295

extended to model DISs, and we propose an extended form of Petri nets.

RELATED WORK

Some attempts have been made to model DISs [Fox81, Pavl83]. The relationship between organisation theory and distributed systems is studied to determine which organisation is best suited for a particular task at hand [FoxSl]. The complexity and uncertainty features of the task are considered and a descriptive approximation to the analytical theory is presented. It does not deal with subproblem interaction and time relationships between processing elements.

Petri nets are used to model a complete distributed knowledge based system and its environment [Pav183]. Here each processing element is relatively simple and the focus is on the interaction between the components and the change in performance if a different relationship between the components is introduced. The model is applied to the analysis of communication policies in a distributed interpretation system, namely, the distributed vehicle-monitoring testbed (DVMT). The analysis leads to the best policy for the given environment and system conditions. An activity represents a knowledge appli- cation process, while a domain is a part of the environ- ment or the processing space from which the activity takes its input. Data contained in a domain is called a data unit. In a HEARSAY-like [Erma81] system, an activity would be a group of knowledge source invo- cations, a domain would be a part of the area of interest and a data unit would be a group of hypotheses. Domain boundaries and the scope of an activity are both appli- cation dependent.

The basic Petri net formalism has been extended by attaching attributes to data units (tokens) and transition functions to activities (places). Transitions are inter- preted as domains. In order to capture the focusing aspect of the problem solving, execution rules have been defined so that the highest priority activities are per- formed. Priority relationships are specified. A critical factor in applying the model is determining the transition function accurately. In the design phase, this may be difficult but a general form of the transition function may be further refined in the verification phase. The paper discusses an example of the model to determine appro- priate communication strategies for the DVMT. Six possible configurations of two nodes, which partially overlap in their input domains, are considered. Transi- tion function, activities, data units and priority relations are defined. After simulation, performance is judged by comparing the values of the objective function for differ- ent configurations.

Basically, the formalism deals with modeling of the organisational and information policies (communication policies), in terms of, for example, what information should be communicated and at what level of abstrac- tion. It is a useful guide in the choice of a communication policy. It does not attempt to model the dynamic control structure of the problem solving system and does not give any analytical techniques for investigating import- ant properties of the system.

FEATURES OF D I S S A N D P E T R I - N E T M O D E L L I N G

Alter surveying the different approaches to DIS (Deck87, Durf89, Erma80, Cull81, GomeSl, Huhn87, Jaga86, Korn81, Less81, 83, SmitS1, Stee84, Urea91, Yang85], we conclude that the following are the features of DISs which should be captured by any modeling tech- nique that we propose to use.

• Elements and their characteristic. Agents: These are the problem solving entities of the system and consist of the knowledge and inference mechanism to solve a given subproblem. Shared data space: Agents must communicate with each other to cooperatively come to an acceptable solution. They do so through this shared data space.

• Interaction among elements." In the most general case of a DIS, all agents can interact with one another. Processing is often characterised by uncertainty in data or partial results.

• Communication: This is achieved through the shared data space.

• Control: This is needed to ensure the coherent behav- iour of the agents, and its structure differs with the paradigm used.

An elementary Petri net model can depict systems with the following characteristics [Pete81]:

• Information being communicated between agents is not of concern.

• All events are instantaneous (they take zero time to occur).

• The use of a result by one agent excludes others from using it, unless there is some mechanism to regenerate it.

The first characteristic above of this model does not enable us to identify 'what' information is being shared by problem solving agents. The content of communica- tion is a very important issue in DPS. Therefore, we must model the DIS using colored tokens. Only when the appropriate colored token appears at an input place does the corresponding transition fire. Similarly, an appropri- ate colored token is sent to the output place(s). The relation between an occurrence color and the token col- ors involved is defined by functions attached to the arcs.

In real systems the problem solving activity does take time. Hence, we can depict this subproblem solving as a timed transition [Carl84], which is basically a transition that takes a finite time to fire. This removes the second characteristic above from the system to be modeled. But we show later that a timed transition in its present form is not suitable for our needs, and we propose a modified approach to associate time with transitions that is given in Extension 1 below.

The above model still suffers from the third limitation above imposed by elementary Petri net execution rules. If a result is needed by several agents, its use by one will exclude others from using it. One solution to this problem is to introduce a feedback arc that regenerates the token. But then the token will be available to agents only one after another. This again contradicts the funda- mental feature of 'concurrency'. The feedback arc will

296 Knowledge-Based Systems

PI t= P2

a

Pt P2 t I

b 7'2

Figure 1. Feedback arc to regenerate token (a) with primi- tive transition, (b) with timed transition

not be suitable in the case of a timed transition (see Figure 1). Therefore, we must extend ordinary Petri nets further by allowing multiple copies of tokens to be trans- mitted on all outgoing arcs from an input place. This essentially means that all transitions can read that token. This notion is similar to the idea of fuzzy Petri nets [Loon88]. The execution rules must be defined differ- ently. This is elaborated in Extension 2 below, which is a modified version of this concept.

It is also important to model constraint propagation in the DIS. Accordingly, an agent should be capable of being interrupted if its problem solving process is to be stopped and backtracked. Therefore we need inhibitor arcs that can inhibit the agent from progressing if con- straints are violated. When an input place is connected to a transition by an inhibitor arc, the absence of token fires the transition. In other words, the presence of a token in the input place inhibits the transition. Such arcs are shown with a circle at the arrow head end of the arc (like the 'not' in logic circuits).

P R O P O S E D E X T E N S I O N S

In view of the above discussion we have proposed the following three extensions. The formal definitions of these will follow in the next section.

Extension 1: Nonprimitive transitions These are used to model events which do not take zero time [Roze85]. The concept of timed transitions has been introduced [Rama74]. We are extending the concept so that such transitions are not atomic. They are made up of a number of atomic or primitive transitions. This view helps us in inhibiting a transition when it is being fired. This is the first time such a notion has been used. When we want an agent to stop work on a current subproblem due to constraint violation, it can be shown with the help of this non-primitive transition. This phenomenon is also of considerable value when modeling a complex system at several hierarchical levels. It is in some sense similar to the subroutine or macro concept of programming lan- guages [Pete8 !]. It is denoted by a rectangle.

Extension 2: Cumulative place In Petri nets, when a transition fires, tokens are removed from input places and deposited in the output places. If

f ) P' /(3

/

P I

P3

"(3 P2

Figure 2. Nonprimitive place at two levels

we denote shared data space in a DIS by such places, the reading of data by one process will remove the data from the shared data space. For example, the 'journal' (to be defined later) of the scientific community metaphor [Korn81] of DPS is a structure that stores all results/ partial results during the problem solving process. This is necessary according to the principle of monotonicity and commutativity [Korn81]. Agora's 'write once' objects are also an example of this approach [Bisi87]. Denoting such a structure by a special symbol greatly enhances the understanding of the model. However, in some cases, this could be simulated by other existing means, such as regenerating arcs. But in other cases it may not be poss- ible to simulate this structure. For example, consider again the Petri net of Figure 1. If the place P~ is input to a non-primitive transition t~ and also to a primitive transi- tion t2, providing a regenerating arc from transition tr will produce the token only after some time duration, and it will be available for t:. One cannot provide a separate transition for the purpose of regenerating the token because only firing that transition will regenerate the token and transition t~ remains the same. Therefore, we introduce the notion of a cumulative place. When such a place is an input to a transition, the firing of that transition does not remove tokens from the input place. A cumulative place is denoted by two concentric circles.

Extension 3: Nonpdmitive places In a similar way to non-primitive transition, we have introduced the concept of a non-primitive place. In DISs the shared data space consists of several distinct areas. In some applications, we may be interested in modeling it as individual interest areas. Hence it may be represented at a higher level of abstraction as a non-primitive place, and, if necessary, at a lower level, it may be split into several primitive places. This immediately conveys the hierarchical structure of the blackboard, or the concept of 'interest areas' in the 'journal'. Another important use of this component is that in cumulative places the 'older' tokens will be transferred into another area (say archive) of the same place. When it is necessary to backtrack, these archives can be brought into the model. This con- cept will be made clear with the help of a small example. Consider Figure 2. The place P~ is shown at two different levels. A non-primitive place is denoted by a circle with four quadrants.

We have shown that the above three extensions, along with extensions of colored tokens and inhibitor arcs, are all necessary to model any DIS environment. (Note that we are not using the 'truth value' concept of fuzzy Petri

Vol 5 No 4 December 1992 297

nets. Fuzzy Petri nets are used to model rule based systems where the conditions have truth values (fuzzy) associated with them.)

Since models have not been built using all these exten- sions together, it is not inappropriate to call a net embed- ding all these features by a special name. We have called it a DIPS Petri net. In the next section, DIPS Petri nets are defined. The modeling is illustrated with the help of the scientific community metaphor.

D I P S - P E T R I - N E T D E F I N I T I O N S

Let P be the set of all places including the set of all cumulative places denoted by CP and the set of all non- primitive places denoted by NP. We thus have CP ~_ P and NP ~_ P. Let T be the set of all transitions including the set of all non-primitive transitions denoted by NT, N T ~_ T. let A be the bag of all directed arcs including the bag of all inhibitor arcs denoted by IA, IA ~_ A.

Let I denote the incidence matrix, where l(p, t) is C(p) x C(t) ---, Z. C is the color function from P U T to a set of finite non-empty sets. C(s) is called the color set of s and an item of C(s) is called the color of s. We define three matrices: I ÷ and I to represent output and input functions, and I e to represent the enabling matrix. Each matrix has m rows (one for each transition) and n col- umns (one for each place). Ie[/, i] is the color function on the directed arc from p~ to tj. An inhibitor arc is denoted by an initial --7 with the element. I-[/', t] = Ie[j, t] for Pi ¢ CP and is zero otherwise. I ÷ [/, t] is the color function on the directed arc from tJ to p~. The incidence matrix I is equal to I + - I . The need to define an enabling matrix in addition to an input function matrix can be explained as follows. In ordinary Petri nets we define only two matrices. The input function matrix itself is used to test for enabled transition. To obtain new markings, an inci- dence matrix is used. This is because, by firing a transi- tion, the tokens from its input places are removed. In the case of transitions with input cumulative places, how- ever, we have to check for enabled transitions based on tokens in input places. These tokens are not removed by firing the enabled transition. Hence we need a matrix I e to check for enablings and another matrix I - to compute new markings. Let e[/] be the unit m vector which is zero everywhere except in the j th element. The transition t~ is represented as e[/].

A non-primitive transition has a processing time asso- ciated with it. Let the processing times of the transitions be denoted by a duration vector D. D[/] = 0 for a primi- tive transition tj. There is a 'start firing' and an 'end firing' event. In between the firing is in progress. The removal of tokens from the input place of a non-primi- tive transition takes place at 'start firing'. The placement of tokens on a non-primitive transition's output place occurs at 'end firing'. While the firing is in progress, the time to end firing, called the residual firing time (RFT), decreases from DO] to zero without causing a change in the net [Carl84, Ho1187]. The RFT is denoted by a vector R, and R[/] denotes the residual firing time of transition t/.

Definition 1.' A DIPS Petri net graph is defined as

DPN = (P,T,A,D,I, I9

Pi A

-it -- ,

I

© NIP(t i )

C

OP(t i ) /

d

IT(P i ) PiOT(Pi )

t i t .

e

IA, f

I I

( ~ C P i

Np i

Figure 3. DIPS Petri-net definitions; (a) place, (b) transi- tion, (c) input and output place of a transition, (d) input and output transitions of a place, (e) nonprimitive transi- tion, (f) inhibitor arc, (g) cumulative place, (h) nonprimi- tive place

Definition 2: Let K be the set of all the possible markings of a DIPS Petri net. A marking M of a DIPS Petri net is a mapping M:P ~ K which assigns tokens to places in the net. A DIPS Petri net with a marking M is called a marked DIPS Petri net M D P = (DPN, m). At any given time the state of the net is defined by the marking and the R F T vector R. Further, we denote IP(ti) and OP(ti) as the input and output places respectively of a transition t~ and IT(pi) and OT(pi) as the input and output transitions respectively of a place p~ (see Figure 3).

Definition 3." A transition tj e T in a marked DPN with marking M~ is enabled if, for all Pie P,

M(p,) ~> e[/].I ¢

298 Knowledge-Based Systems

P2( ,)

t I t I

(,,)

( ,) ( a b c d

Figure 4A. Firing of primitive transition," (a), (b) without cumulative input place, (c), (d) with cumulative input place [(a) tj enabled, (b) tj fires, (c) t, enabled, (d) t+ fires.]

PI

t i

a

t i

f t.

1

c

) Figure 4C. Firotg of nonprimitive transitions with cumulat- ive input place; (a) ti enabled (t = r), (b) t~fires (t = r) (c) ti completed (t = z + D[l])

I-(P t

+"+ r - - ' - - - I

I~P2'tl) I

a

(.

| i c--:

)

---3

b

(.)

tl ,

¢

Figure 4B. Firing of nonprimitive transitions; (a) ti ena- bled (t = ?), (b) ti fires (t = T), ti completed ( t = T + D[O)

Definition 4.' A transition tj in a marked DPN with mark- ing M+ may fire whenever it is enabled. The firing of transition t/results in a new marking after a time lapse of D[/], given by

M'U+Dm) = M+(pi) + e[/].I

Definition 5: The next-state function 6 for a DPN with marking +44+ and transition (/e T is defined if tj is enabled. If~5(M, tj) is defined, then ~(M~, tj) = M'(~+Dm) for allpi c P.

These definitions show that multiple copies of tokens are passed from a place to all its output transitions, thus enabling them, and transitions connected with places by input inhibitor arcs are enabled only if tokens are absent in such input places (see Figures 4A-4C).

Definition 6." The reachability set R (DPN, M) for a DPN with a marking M is the smallest set of markings defined by the following:

• M e R(DPN, M)

• If M'+ ¢ R(DPN, M) and M" I'++Dm> = 6(M'+, ti)

for some t i ¢ T, then

M"~+am e R(DPN, M)

M o d e l l i n g e x a m p l e : s c i e n t i f i c - c o m m u n i t y m e t a p h o r

The scientific community metaphor [Korn81] of problem solving has the features discussed in the third section of this paper. In our model agents are the problem solving entities of the system and they communicate through the journal. The concept of the journal is similar to that of the journals in scientific communities. All the agents commu- nicate through the journal. It is subdivided into areas. Each entry in the journal is a partial result consisting of an index along with the name of its author, and its con- text. The context consists of the references based on which the result has been computed. We have introduced a place called sponsor S and a transition t~ into the model to reflect the concept of constraint violation. In the actual system all the agents have access to the journal and they can identify constraint violation and identify the result that led to this violation by backtracking through the references. They take relevant action by aborting all further processing which is based on this result and instructing the agent that was responsible for the viola- tion to recompute the same result. When partial results are written on the journal they may have some certainty factor value. This may subsequently be reduced by a function REDCF if constraint is violated. In the model we assume that the primitive transition t i is triggered when the value of the certainty factor goes below a threshold value and deposits a colored token in S. This function is called CON. From S inhibitor arcs are provided to all nonprimitive transitions ntt, nt2 . . . . . nt+, which represent operations performed by agents and may be algorithmic or heuristic or a combination there- of. There may be some n steps involved in each of these nti. S is essentially connected to all these subtransitions.

Vol 5 No 4 December 1992 299

t=t

l

A n

n 2 7 7

Figure 5. DIPS Petri-net model o f scientific-community metaphor

So work at any step may be aborted. Thus the colored token in S inhibits all agents, except the one which should take corrective action, from further work.

Transition tw is a simple write operation. Results obtained by nt~, nt2 . . . . . nt,, are written to the journal by tw. Transitions nt~, nt2 . . . . . nt,, are triggered by specific colors of tokens on the journal, i.e. specific data or infor- mation. Similarly, tw is also triggered by colored tokens. This ensures that data to be read from and written on the journal (shared data) is properly abstracted.

We see that the properties mentioned above relating to scientific communities are satisfied in the proposed system as follows:

• Monotonicity: Agents publish their results so that they are available to all agents who are interested. An altered result contradicting an earlier one is also stored.

• Commutativity: It does not matter whether an agent is interested in a result before it was published or after it was published. Agents also keep abreast of further developments as they continue their work.

• Parallelism: Agents can work concurrently with one another without adverse effects.

• Pluralism: Agents may work on multiple hypotheses at the same time.

Figure 5 gives the graphical representation of the DIPS net model of a DIS based on the scientific community metaphor.

A N A L Y S I S T E C H N I Q U E S

After demonstrating modeling by DPN, we elaborate some of the analysis techniques for the DPN models. Reachability analysis is done by reducing the tree by means of equivalent markings and other conventional techniques. The place invariants and transition invar- iants are derived from the matrix equations and they are interpreted to reflect the properties of the model [Uma 90].

Reachability-tree analysis The reachability tree (RT) of a DPN represents the rea- chability set of the DPN. The following are the signifi- cant differences between the RTs of DPNs and the RTs of Petri nets:

• An important fact to be noted is that an entry of 0 in the incidence matrix of an ordinary Petri net could mean two things. Either the place and transition are not connected or the place is both an input and out- put for the transition. This problem does not arise in DIPS Petri nets, where arcs have functions associated with them and a pair of oppositely directed arcs between a place and a transition have different labels.

• There is another fundamental difference between ordinary Petri nets and DIPS Petri nets that will radi- cally change the analysis of the reachability tree. In the reachability trees of ordinary Petri nets, when several transitions are enabled, we fire one of them and analyse the sub-tree reached owing to the firing of the transition. Hence, every arc in the reachability tree has a single label attached to it, namely, the transition that is fired. In DIPS Petri nets, we are trying to model systems where there is parallelism within the compo- nents. The net will go from one marking to another by firing several transitions simultaneously. Therefore, the structure of the reachability tree for DIPS Petri nets will be different. The arcs will have a label com- prising all the transitions that are fired (see Figure 6b).

• There is also a time component involved in non- primitive transitions. Arcs labeled with a non-primi- tive transition ti will take a marking M~ to a marking M,2, where z2 = ~1 + D[l]. If an arc is labeled with more than one non-primitive transition, with different processing times, then the transitions will finish at different times although they may be fired at the same time. If an arc is labeled with non-primitive transi- tions, say ti and ti, then the reachability tree will appear as shown in Figure 6c.

• There are inhibitor arcs in DIPS Petri nets. Transitions can fire only when the input places of inhibitor arcs do not have tokens. When a non-primitive transition tt is in progress and an inhibitor arc connected to it is activated to inhibit t~, then the resultant marking will not be produced as per the definitions (see Figure 6d). We shall reduce the reachability tree by means of duplicate markings, dead markings, markings with an arbitrarily large number of tokens in a place co, and equivalent markings.

Matrix equations Based on the definitions and execution rules of DIPS Petri nets, we can analyse a DIPS Petri net model of a given system for the properties of boundedness, conservation, freedom from deadlocks, termination and reinitialisabi- lity. Using place invariants we can find subnets in which tokens cannot be lost or gained in an uncontrolled way.

Definition 7: For a sequence of transition firings cr = tit ti2 • " bk, we have

5(M, or) = 5(M, t~j . . . tj~) = M + (e[/,] + e[/2] + . . . + e[h])'! = M + f(cr)-I (1)

300 Knowledge-Based Systems

(I,0,1,0)

( 1,0,0,1 )

(I,u,l,O) / ',,

(I,~,0,0) (I,~,0,1) I

(I,~,1,0) a

(M I )

~(t=,t a) (M 2 )

~ (t2, t 3)

(M 3 )

(M

8"r I (M 2

) R : ESrl ,~r a]

(t~ ,t a) R = EO, 8re -St I]

8 r 2 ( M 3) R= E o , o ] C

( M I

(M,) ', I I

)

(tl,t 2)

t

d Figure 6. Changes in reachability tree for DPN; (a) rea- chability tree for Petri nets, (b) simultaneous transitions, (c) simultaneous fired timed transitions, (d) effect of inhi- bitor arc on reachability tree

f(o) = e[jJ + e[j2] + . . . + e[jk] is called the firing vec- tor. The ith element in this vector is the number of times the transition ti fires in the sequence. The firing vector is thus a vector of nonnegative integers. It lacks any sequencing information about the transitions fired.

Definition 8." A solution of the equations

I.X = 0 (2)

is called a p invariant of the given DPN. These relations can be exploited to verify specific properties of the net and particularly to show that the net is bounded and deadlock-free.

Definition 9: Given the marking Me(p) we can find out if a marking M'(e+8~)(P) is reachable from it by solving Equation 1 for M'(~+~e)(p). Let Do[/] denote the duration vector corresponding to a. Since we are dealing with a sequence of transitions fired.

5z = ~ (D~[/]) [/=q

The solution to Equation 1 is a necessary but not suffi- cient condition for reachability. For example, none of the transitions in the firing vector may be enabled in the marking M~.

Definition 10." In Equation l, if

f(a).I= 0

then

5(M, ¢0 = M (3)

or in other words M',+~e)(p) = Me(p) and we get the firing vector for reaching back to any marking. If the marking is the initial marking this firing vector will give us the condition for re-initialisability. Equation 3 gives transition invariants. ~Sz is the same as is defined in Defi- nition 4.

The use of the above definitions to solve a particular problem is shown below with examples.

Example 1 Given the initial marking M and the final marking M' for successful termination of the problem solving process, to investigate whether the execution of the DPN terminates in a finite time or in a given period, carry out the follow- ing:

• Find out if M' is reachable from M, by solving Equa- tion l with 5(M, 6) = M'.

• If the transitions in the firing vector are not enabled in the present marking, report failure and exit.

• Find Do[/] and check if it is finite or it is not more than the given period. If the conditions are not met, report failure and exit.

• Report success.

Vol 5 No 4 December 1992 301

The above procedure is a particular case of the reachabi- lity problem. In general M' can be any marking.

Example 2 To find if a given DPN is deadlock free,

• solve Equation 2 with X = [M(pO . . . . . M(pm)],

• interpret the m equations obtained (p invariants) with reference to the process being modelled. This can be seen in the following examples.

Example 3 To find if a DPN is re-initialisable or if a given marking M can be reached again,

• solve Equation 3 to get t invariants, • if none of the transitions in fro) are enabled in M,

report failure and exit, • report success.

Analysis example

We will illustrate the analysis of a DIPS Petri net model with the help of the same example, first by using the matrix approach and later by the reachabitity tree.

Scientific community metaphor matrix equations For the DIPS Petri net graph shown in Figure 5 the following transpose of the incidence matrix is formed. For the sake of convenience we have written the write function W only once in the matrix for all the agents. This does not alter our analysis because the write func- tion is identical for all the agents.

n t t n I n I w [i

Ai

I t ~ m n

J S

FI 0 - W 0

0 0

---ninhA

F,, - W 0 0 1 R E D C F

---ninhA,, 0 CON

n t l n l n t . , t~

AI

I ~I = A,, J S

0 0 W 0

0 Xi

---ninhA~

0 W 0 X,, 0 R E D C F

---ninhA,, 0 CON

Y 1 . . . X n have been written for the arguments for func- tions F~ . . . F,,. By solving Equation 2, we get the place invariants as follows.

PI1:

F~(M,(J)) + -ninhA~(M~t(S)) = 0

This is interpreted as ' the function F~ on the marking of J at time x operates as long as there is no inhibiting func-

tion from S during the interval int = (z, z ~- 6~)'. /% is the duration of the corresponding transition. The sum of these two terms being zero, at no time can the function F~ operate while inhibition is true. There will be n such invariants for the other n agents.

PI2:

Me(J) = W(M~(A,) + . . . + M~(An))

This is interpreted as 'the marking on J at time ~ is the result of function Won the markings Of Ab A2 . . . . . A,, at time ~'. This is because the write function is a primitive function.

P/3.

REDCF(M~(J)) + CON(Mr(J)) = 0

This is interpreted as 'the marking on S at time x is the result of the CON function on the marking of J at time z' simultaneously with the function R E D C F working on the marking on J at time ~.

All these functions and their arguments have been elucidated above in the fifth section of the paper. These invariants show that the model that has been built reflects all the essential properties of the problem solving system that we have tried to represent. In addition, we can verify the following properties of the system:

• The system cannot deadlock because as long as there are tokens on the journal the transitions F~ . . . . . Fn are enabled.

• The problem solving process terminates after success- ful completion because at such a time the sponsor will inhibit all transitions F~ . . . . . F,,.

• The tokens are not lost or gained in an uncontrolled way.

We can intuitively conclude that the markings of a DIPS Petri net with cumulative places are not reproducible. This is because of the fact that a cumulative place collects all the tokens that it receives. This is a drawback since the net is not re-initialisable. At the same time it can be considered a merit to develop the net to model learning systems.

Reachability-tree analysis

The reachability tree of the model based on the scientific community metaphor is shown in Figure 7. The place vector is (J, Ai, S). Ai represents all the problem solving agents. Initially, the problem specification is available on the journal. The initial marking is, therefore, (I, 0, 0), where I is the initial token in J. With I in J all the n6 are enabled and they fire at once. But their processing times may be different and they finish at different times. Even- tually, the net reaches the marking (/, F~ (/), 0). Then all the outputs of the functions Fi are written onto J, taking the net to ( I + / ' , 0, 0) where I ' = F~ (/). We cannot consider this marking as being equivalent to 1 because at this point, along with nt~, (j may be enabled owing to constraint violation, ti is a primitive transition and it fires to produce the marking 4. This marking 4 may inhibit

302 Knowledge-Based Systems

4.5 (r,o,o) 0 n',l

( i , I t ,o ) D [nt/]

(I Ii,O,O)

I+Ii=I i ~ ~D [nt i] /'I+12=II ( II+12,0,0 )

Figure 7. Reachability tree for scientific-community meta- phor

(shown as a horizontal line) one or more of the nti in progress. Let the marking eventually reached be 5 which is equivalent to 3. When no more constraint violations are present, t/is not enabled and all the nti finish success- fully to produce the required result.

C O N C L U S I O N S

In this work, we have developed the framework necess- ary to model DISs and analyse the model. A direction for future work would be to explore the possibility of auto- mating this entire process. That is, given a DIS, generate the model automatically, and the user must be able to interactively modify this model to

• add functions to the arcs, • give durations to non primitive transitions, • validate the general structure.

Once the model has been finalised, the analysis tech- niques could be initiated for matrix equations. We have already developed a structural notation which can be used to convey the description of the DIS to a program [Uma91a]. We are pursuing the other directions.

REFERENCES

[Brau871

[Bisi87]

[Carl84]

[Cull81]

Brauer, W, Reisig, W and G. Rozenberg (Ed.) Petri nets: Central Models and their Proper- ties Springer-Verlag (1987) Bisiani, R et al 'The architecture of the AGORA environment' in M. Huhns (Ed.) Distributed Artificial Intelligence Morgan Kaufmann (1987) pp 99-107 Carlier, J, Chretienne Ph and Girault, C 'Modelling Scheduling problems with timed Petri nets' in Rozenberg, G (Ed.) Advances in Petri nets Springer-Verlag (1984) pp 62-82 Cullingford, R E 'Integrating knowledge sources for computer "understanding" tasks' IEEE Trans. on Systems, Man and Cybernet-

[Deck87]

[Durf89]

[Erma80]

[Fox81]

[GomeSl]

[Ho1187]

[Huhn87]

[Korn81]

[LessSl]

[Less83]

[Loon88]

[Pavl83]

[Pete81]

[Petr62]

[Rama74]

[Roze85]

[Stair81]

ics Vol SMC-I I No I (Jan/Feb 1981) pp 52- 60 Decker, K S 'Distributed Problem Solving Techniques - A Survey' IEEE Trans. on S M C Vol 17 No 5 (Sep/Oct 1987) pp 729-740 Durfee, E H et al 'Trends in Cooperative Dis- tributed Problem Solving' IEEE Trans on Knowledge and Data Engineering Vol 1 No 1 (March 1989) pp 63-83 Erman, L D, Hayesroth, F, Lesser, V R and Reddy, D R 'The HEARSAY-II speech understanding system: Integrating know- ledge to resolve uncertainty' Comput. Surveys Vol 12 (June 1980) pp 213-253 Fox, M S 'An Organisational view of Distri- buted Systems', IEEE Trans. on Systems, Man and Cybernetics, Vol SMC-11 No 1 (Jan/Feb 1981) pp 70-80 Gomez, F and Chandrasekaran, B 'Know- ledge organisation and distribution for medi- cal diagnosis' IEEE Trans. on Systems, Man and Cybernetics Vol SMC-11 No 1 (Jan/Feb 1981) pp 34-42 Holliday, M A and Vernon, M K 'A Genera- lised timed Petri net model for Performance analysis' IEEE Trans. on Software Engineer- ing Vol SE-13 No 12 (December 1987) pp 1297-1310 Huhns, M (Ed.) Distributed Artificial Intelli- gence Morgan Kaufmann, USA (1987) Kornfield, W A and Hewitt, C E 'The Scien- tific Community Metaphor' IEEE Trans. on Systems, Man and Cybernetics Vol 11 No 1 (Jan 1981) pp 24-33 Lesser, V R and Corkill, D D 'Functionally accurate, cooperative distributed systems' IEEE Trans. on Systems, Man and Cybernet- ics Vol SMC-11 (Jan 1981) pp 81 96 Lesser, V R and Corkiil, D D 'The distributed vehicle monitoring testbed: A tool for investi- gating distributed problem solving networks' AI Magazine Vol 4 (Fall 1983) pp 15-33 Looney, C G 'Fuzzy Petri nets for Rule-based Decision making' IEEE Trans on Systems, Man and Cybernetics Vol SMC-18 No 1 (Jan/ Feb 1988)pp 178 183 Pavlin, J 'Predicting the Performance of Dis- tributed Knowledge-based Systems: A Modeling Approach' Proc. of Third A A A I Conf. on Artificial Intelligence Washington DC, USA (Aug 1983) pp 314-319 Peterson, J L Petri net Theory and the Model- ing of Systems Prentice Hall, USA (1981) Petri, C 'Kommunikation mit Automaten' PhD Dissertation University of Bonn, Ger- many, 1962 Ramaehandani, C 'Analysis of asynchronous concurrent systems using Petri nets' PhD Dis- sertation Massachusetts Institute of Techno- logy, USA (1974) Rozenberg, G (Ed.) Advances in Petri nets Springer-Verlag (1985) Smith, R G and Davis, R 'Frameworks for Cooperation in Distributed Problem Solving'

Vol 5 No 4 December 1992 303

[Stee~]

[Uma90]

[Uma91a]

[Uma91b]

[Yang85]

IEEE Trans. on Systems, Man and Cybernet- ics Vol 11 No 1 (Jan 1981)pp 60-70 Steeb, R et al 'Distributed problem solving for air fleet control', Technical Report N-2139 Rand corporation (April 1984) Uma, G, Prasad, B E and Reddy, P G 'A Distributed problem solving approach to Network Design', Proc. of the 3rd lnternatl. Sympo. on AL Mexico (Oct 1990) Uma, G 'A Framework for Modelling and Analysis of Distributed Intelligent Systems' PhD Thesis University of Hyderabad, India (May 1991) Uma, G, Prasad, B E and Reddy, P G 'A Framework for Modelling and Analysis of Distributed Intelligent Systems' Vivek Quar- terly in AI (to appear) Yang, J D, Huhns, M N and Stephens, L M "An architecture for control and communica- tions in distributed artificial intelligence systems' IEEE Trans. on Systems, Man and Cybernetics Vol SMC-I 7 (May/June 1985) pp 729~40

BIBLIOGRAPHY

[Bond88]

[Chan81]

[Conr88]

Bond, A H and Gasser, L (Eds.) Readings in Distributed Artificial Intelligence Morgan Kaufmann, USA (1988) Chandrasekaran, B 'Natural and social system metaphors for distributed problem solving: Introduction to the issue' IEEE Trans. on Systems, Man and Cybernetics Vol SMC-tl No 1 (Jan/Feb) 1981 pp 1-5 Conry, S E, Meyer, R and Searlemen, J 'Mul-

[Dult87]

[Holt68]

[Hube85]

[Jaga86]

[Ober86]

[Rieg81]

[Uma87]

tistage negotiation in distributed planning', & Bond, A H and Gasser, L (Eds.) Readings in Distributed Artificial Intelligence Morgan Kaufmann, USA (1988) pp 367-384 Duffy, A 'Bibliography Artificial Intelli- gence in Design' AI in Engineering Vol 2 No 3 (1987) pp 173-179 Holt, A et al'Final Report of the Information System Theory Project' Technical Report RADCTR-68-305 Rome Air Development Center, Griffis Air Force Base, NY, USA (Sept. 1968) Huber, P e t al 'Towards Reachability trees for High Level Petri Nets' in Rozenberg, G (Ed.) Advances in Petrinets Springer-Verlag (1985) pp 215 233 Jagannathan, V and Dodhiawala, R. 'Distri- buted Artificial Intelligence: An annotated bibliography' SIGA R T Newsletter (Jan 1986) pp 44-56 Oberquelle, H 'Human-Machine Interaction and Role/function/action nets' Advances in Petri nets 1986--Vol II Springer-Verlag (1986) pp 171-190 Rieger, C and Small, S 'Toward a theory of distributed word expert natural language parsing' IEEE Trans. on Systems, Man and Cybernetics Vol SMC-11 No 1 (Jan/Feb 1981) pp 43 51 Uma, V 'KBANDS - - A Knowledge Based Network Design System' Proc. of 1st Inter- natl. Conference on Computer Communica- tions for Developing Countries New Delhi, India (Oct 1987)

304 Knowledge-Based Systems