• No se han encontrado resultados

Fecha de realización de la visita del técnico certificador

Definition 3.2.2. A CEFSM (Communicating Extended Finite State Machine) is an

extension of EFSM with communication channels. CEFSM E is a tuplehD, Fi whereD is the global declaration and F is the finite state machine associated with E. The finite

state machine F is a tuple of the formhNF, n0, nf, TF, CF, VF, IFi, where

• NF, n0, nf, TF, VF andIF are defined as before and

• CF is a finite set of input/output communication channels used in this CEFSM.

The global declaration D is a tuple of the form hCDF, GFDi. The set GFD is as defined for EFSMs. Channels are defined with a name and a designation of synchronous or asynchronous. Let C denote the set {hname,SYNC|ASYNCi| for all the channels in the system } where name is the global name of the communication channel and SYNC

indicates the channel is synchronous and ASYNC indicates it is asynchronous.

There can be more than one use of the same communication channel in an CEFSM at different transitions. Each use of a communication channel c∈ C identified as cf ∈CF

can be represented by a tuple of the formhname, t, v, IOi where

• name refers to the name of the channel,

• t∈TF refers to the transition linked to this use of the channel,

• v refers to the variable∈VF whose value will either be output or input through this

channel, depending on whether it is a reader or writer. v can be empty in which case the channel is used for signalling and

• IOindicates whether this channel is an input or an output channel. IOwill contain the value “input” or “output” accordingly.

The set CDF is a set of channels associated with F. CDF can be defined as CDF = {hc, Xi|(∀u ∈ CF) s.t. ((c ∈ C)∧(Π1(c) = Π1(u))∧(X = R|W|B))} where Π1(z) is

the projection of the first element of the tuple z. X = R and X = B have the same interpretation as the one for global variables. X=W indicates thatcis a writer but not a reader for this channel. A synchronous channel can be either written to or read from by a CEFSM but not both. Hence a synchronous channel can never have the property X =B. The use u of the channel must be consistent with the properties of the channel declared in D.

Further, each communication channel has certain global properties which can be de- scribed as follows

• Synchronous actions: SY N C|ASY N C indicates whether the channel is a syn-

chronous channel or an asynchronous one. This property is specified in the dec- laration section of every CEFSM F where this channel is used, and they must be declared the same in each CEFSM definition they appear in.

• Consumability: This is a property associated with the buffers of the asynchronous

channel. We assume that all buffers are consumable. This means that writers can overwrite data in the buffer and readers will empty the buffer on reading data from it. Further readers will block if the buffer is empty,

• Buffer Location: All buffers are assumed to be located on the reader side of a

communication channel,

• Buffer Size: All buffers are assumed to be of size 1 and

• Multiple readers: We further assume that each channel is a one to many com-

one writer but can have one or many readers.

We can now define properties that would determine whether a given CEFSM is a reader, writer or both for a global variable/communication channel. Let x be a global variable and F be a CEFSM. If any action set α of any transition t ∈ TF in F has an

assignment of the form x=αx thenF is a writer for this global variable. If an expression

of the form E(V) such that x∈V is used in either the guard or action of any transition of F then F is a reader for this variable. Similarly, if there is a channel usage cf ∈CF

such that it is an input channel, then F becomes a reader for this channel and if it is an output channel then F is a writer for this channel.

Graphical Representation. A CEFSM E is represented graphically as follows:

• Every location n∈ NF is represented by a circle. The initial location n0 is repre-

sented by an incoming transition with no source location.

• Every transition t∈TF such that t=hn, g, α, n0i is represented by a directed edge

from the source location n to the destination location n0. Other properties are similar to EFSMs.

• Every use of the communication channel cf ∈ CF in the CEFSM such that cf =

hname, t, v, IOi is represented by the following notations depending on the proper- ties of the communication channel

– The channel isasynchronous, consuming, reader side buffer with single

writer then the transitiontwill have the action “cn!!v” appended to its action list. Otherwise it will have the action “cn??v” appended,

– The channel is synchronous with single writer and single or multiple

readers : If this use of the channel is as a writer then the transition t will

have the action “cn!v” appended to its action list else it will have the action “cn?v” appended, P = 1 ; C D E B = false B = true (X > 2) (Z <= 1) A U Y = 1,T=0 ; C ?(NWS) M ==> ==> ==> ==> ==> ==> (Z > 1) (M > 1) C !(NWS) Y (X > 2) X Y V N = false N = true (M <= 1)

Figure 3.5: Communicating Extended Finite State Machine

Documento similar