Escolar Documentos
Profissional Documentos
Cultura Documentos
ence specifications which can be used to derive (header definition)contains principally the defini-
formally tests to verify that implementations con- tion of the module name together with possible
form to them, or to directly derive implementa- input variables and the names of its interaction
tions. If neither Estelle nor LOTOS are preferred, points; the second part (body definition) specifies
the problem will arise as to whether two specifica- its behaviour. This part consists of three subparts:
tions of the same object will be compatible, i.e. (1) the declaration, which specifies constants, vari-
whether tests derived by them will check the same ables, local types and used functions; (2) the ini-
properties, or implementations derived by them tialization in which the local variables and the
will realize the same object, module state are initialized; (3) the transition
In the rest of the paper, after a brief presenta- which specifies the set of transitions that the mod-
tion of the two FDTs, we will address incompati- ule can execute. Each transition is made up by a
bility problems which can arise in the above de- set of clauses and a transition block. The transi-
picted situation, and specify more precisely the tion block, which is a list of statements, is ex-
notion of compatibility. We will also analyze the ecuted when all the clauses in the relative set have
intrinsic differences between Estelle and EOTOS been verified. The main clauses which concur to
which can cause the production of incompatibili- enable a module transition are:
ties and show that this will happen more often in - the state of the module,
certain application areas. Finally, we will briefly - the presence of a particular interaction in the
introduce and discuss the techniques and methods queue associated to an interaction point,
that can be used to detect potential sources of - the truth of a boolean formula,
incompatibility, stating possible directions of fu- - the priority among transitions,
ture research. - the time elapsed since the preceding transi-
tion.
Note that the last clause makes it possible to
model a synchronous system which can quantify
2. Estelle the time elapsed from the end of one transition to
the beginning of the next.
Estelle [2] is a Pascal-based language with ex- The 'firing' of a transition consists in the execu-
tensions to encompass parallelism. An Estelle de- tion of a block of statements associated to it and
scription of a system consists of a set of modules in the passage from the current state of the rood-
exchanging messages through bidirectional com- ule to that specified in the ' t o ' clause.
munication channels. Each module is an extended The set of modules which constitute the system
state transition machine which, when enabled, can description is hierarchically structured; it forms a
execute a transition from one state to another, tree whose root is the whole system specification.
In Fig. 1 the syntax of an Estelle module is This hierarchy is dynamically variable in terms of
shown. It consists of two parts; the first part modules and of channels linking them. In particu-
lar, the language provides constructs to dynami-
module Name (list-of-variables)process cally create and terminate modules (called 'sons').
ip Pl: channel-type(role) When a module is created, it is not linked to any
end other module. In order to be able to send or
body Name 1 for Name 2 receive messages, the father (the module that has
(DECLARATION PART} created it) properly connects its interaction points
const ... (by the statement 'connect').
vat ...
state ... By ' p r o p e r l y ' we mean that two interaction
... points (belonging to different modules) will be
initialize (INITIALIZATION PART) connected only if they have the same type and the
to ... {initial module state} two modules use them with dual roles. More pre-
'" cisely, as shown in Fig. 1, a type is associated to
trans (TRANSITION PART}
(clauses, transition blocks)* every module interaction point. This type char-
end acterizes the primitives through which the module
Fig. 1. Module header and body definitions, may send and receive messages and identifies the
A. Fantechi et al. / Formal Protocol Descriptions 13
channel name (Rol%, Role2) process behaviour. For example, the syntax of a
by Role~ behaviour expression B is simply:
Interaction Namel(typed parameters);
•" B := a ; B ' IB' op B" Ip[g][v] ]stop
Interaction Name N(typed parameters);
byInteraction
Role, Namel(typed parameters):
where B' and B" are behaviour expressions, a is
an action (or event) and op indicates the symbol
Interaction NameK(typed parameters): for sequential composition (":"), non-determinis-
Fig. 2. Channel definition, tic choise (" []"), parallel composition (" Ir' or "tl]"),
etc. The stop action denotes a process which is
unable to perform any action, p[g][v] denotes pro-
cess calling.
kind of messages exchanged between partners. The main actions considered are the communi-
Fig. 2 shows the syntax for channel definition, cations between a process and the external en-
which makes it possible, for each channel type, to vironment, which are based upon the general idea
express both the primitives for exchanging mes- of "interaction". In an interaction, a LOTOS pro-
sages and their type. These interaction points may cess and the external environment establish to-
he disconnected during the computation. Note gether the t-uple of values they want to exchange
that only two modules will be involved in a corn- through a 'gate' (or interaction point). The syntax
munication: the sender and the receiver. Conse- for these action is:
quently, this kind of communication is 'point to
point' (or symmetric), g?x:t g!v
A module delegates a son to receive messages which denotes, respectively, a process which can
from one of its interaction points. For this reason interact at the gate 'g' offering any value of type
the two interaction points must have the same ' t ' and a process which can interact at gate 'g'
type and the two modules must use them with the offering only the value ' v'.
same role. The synchronized parallel composition operator
Each module interaction point has an associ- is used to define processes which are going to
ated unlimited queue in which all the messages interact at the same gate. Interaction generally
received by the module are enqueued; conse- occurs between more than two processes: they
quently the communication is said to be asynch- synchronize by simultaneously offering/accepting
ronous, the same value at the same gate. In this way
synchronous point to point and multicast com-
munications can be modeled.
Another important action is the unobservable
3. L O T O S 'i'. This action is hidden from any external ob-
servation, i.e. an external observer of the system
LOTOS (Language of Temporal Ordering does not see its execution. Such actions may be
Specification) [3] is a language based on process produced as the result of a hiding operation per-
algebraic methods and is derived from Milner's formed on a system of composed processes. In this
Calculus of Communicating Systems [4]. A system way internal implementation details are hidden,
is seen, by LOTOS, as a single process which may and only the interactions with the external world
contain several interacting subprocesses. A pro- can be observed. This concept is the basis on
cess is described by defining the temporal relation which a notion of observational equivalence, which
between the events that constitute its externally can be used to relate descriptions at a different
observable behaviour. To shape the temporal abstraction level, is constructed.
ordering of events, the language provides several Another event considered in the behaviour ex-
operators (sequential composition, non-determin- pressions is the termination (unobservable) action
istic choice, synchronized and non-synchronized which makes it possible to pass a result value to
parallelism, etc); using these operators properly, it the continuation of a terminated process ('d'). In
is possible to build expressions which specify the this way, processes can be called as if they were
14 A. Fantechi et al. / Formal Protocol Descriptions
procedures; recursive calls are also admitted. In with proving the equivalence between these speci-
particular, the LOTOS BNF syntax of the process fications, but a weaker relation: their compatibil-
declaration is: ity. This notion can be informally described thus:
process declaration given a LOTOS description L and an Estelle de-
:= process process identification[gate*][value*] scription E of the same protocol, L and E will be
compatible if two processes using two protocols,
'.'= 'behaviour expression endproc one implemented from L and the other from E
A process is called by referring to its name and (using the standard derivation methods) can com-
supplying it with an n-uple of gates and an m-uple municate correctly.
of values. Compatibility can be defined formally as a
Values, value expressions and data structures in relation between two specifications which guaran-
LOTOS are represented using an algebraic specifi- tees that the derived implementations communi-
cation method which allows parameterized ab- cate [5].
stract data types to be defined. Assuming that we have a LOTOS and an Estelle
description of a given system, two main factors
may concur so that the descriptions effectively
4. Compatibility between Estelle and LOTOS De- specify two different objects:
seriptions - d i s t i n c t interpretations of the informal de-
scription,
An Estelle or LOTOS specification can provide - differences between languages.
the basis which can be used to develop an imple- Different interpretations of informal descrip-
mentation of the specified system (service, proto- tions by the relative specifiers (ignoring the possi-
col). The development from specification to imple- bility of errors made by them) may result in
mentation will consist of one or more transforma- differences between LOTOS and Estelle descrip-
tion steps which are generally written in different tions. In fact, as the reference description is infor-
programming languages. Each transformation step mal it may be ambiguous and thus two different
will include the implementation of details which specifiers (one using LOTOS and the other Estelle)
were not considered in the higher level specifica- may interpret it differently. We will not discuss
tion. This process should be associated to a notion this question in detail: we only want to stress the
of correctness which ensures that the derived ira- need for a comparison between formal descrip-
plementation conforms to (behaves as specified tions which are derived from the same informal
by) the specification, one.
In this context we assume that some rigorous A more interesting question is the presence of
standard or automatic way of deriving a correct differences between the two specifications which
implementation from a specification is available may arise because of differences between the two
(the development of such a technique is by no FDTs. To clarify this point we give a simple
means an easy task). Therefore we presume that example.
the implementation process is error free. This Consider the following system:
means that the origin of any difference between
implementations of the same system must be Sender:
searched in the formal descriptions from which -send the message '5' to Receiver,
they have been derived. Consequently, we can -wait until Receiver has acknowledged it,
concentrate on the differences between LOTOS -repeat forever.
and Estelle specifications. The presence of two Receiver:
formal specifications of the same protocol raises -receive a message of type 'nat' from Sender,
the question as to whether they really represent -acknowledge reception,
the same object. We are not concerned however -repeat forever.
proc Sender[a] noexit := a !5; Sender [a] proe Receiver [a] n o e x i t := a ?x: nat; Receiver [a]
endproc endproc
Fig. 3. L O T O S specification.
A. Fantechi et al. / Formal Protocol Descriptions 15
Synchronous versus asynchronous. As we have tities are involved: one sending a message (sender)
already stated, communication between LOTOS and the other receiving it (receiver). On the other
processes is synchronous, whereas in Estelle com- hand, in multicast communication, a single entity
munication between modules is asynchronous with sends a message to more than one receiver. Multi-
a boundless queue. The Estelle interaction scheme cast communication is very useful, for example it
does not permit the "backpressure" control flow can serve at the operating system level to obtain
to be modeled directly [6]. Backpressure is an information on the physical location of distributed
implicit control flow mechanism of messages from resources, their availability, etc.
a user (or client) to a provider (or server), which The main problem raised in multicast com-
specifies that the user is blocked from sending munication is that of being able to send a message
other requests to the provider when the communi- to a set of processes synchronizing with all of
cation channel queue between them is full. In this them. With LOTOS, using all the facilities offered
mechanism, there is no explicit communication of by the parallel composition, simultaneous interac-
control information between the two partners. The tion with a set of processes is possible. It is
presence of a boundless queue between two corn- sufficient to compose correctly all the processes
municating modules imposed by Estelle means interested as follows:
that "full queue" status is never reached. For
instance, if the session protocol wants to send the ((---(P1 [glP2) [g[ ... )1 g IPN)
communication request to the transport protocol, in which processes P1, P2 . . . . . PN must interact at
it will perform: the same gate 'g'. The LOTOS parallel composi-
output T_ch.CR(process A, process B. . . . ) tion semantics forces every process in the above
set to interact (synchronize and possibly give a
where T ch is the channel which links the two value) at gate 'g', whenever possible. We may find
protocols. The message will be enqueued in the this problem in the OSI model when lower layer
correct queue without checking the queue status, protocols are to be specified (e.g. Ethernet).
Implementations derived from an Estelle formal Estelle only provides point to point communi-
description of this type should have a boundless cation mechanisms. This means that situations in
queue between these protocols, even if the imple- which a process must send a message to more than
mentation language has mechanisms for synchro- one receiver cannot be described directly. The
nous communication and for asynchronous corn- solution is to emulate the multicast communica-
munication with bounded queues, tion to n entities through n symmetric communi-
In LOTOS, it is easier to specify backpressure cations: each process must be directly connected
flow because a user can only send a request to the (through a channel) to the others; immediate
provider when the latter is ready to interact at the simultaneous synchronization of all the processes
same gate. Consequently, if the provider is busy is not respected.
meeting other requests, it may delay the service Time notion. The F D T s may be required to
request simply by not interacting at the gate in express time measuring features. This is impossi-
question, ble in L O T O S because there is no time notion. On
Note that the formal specification of backpres- the contrary, Estelle can express these aspects well
sure control flow is not taken into consideration in using the delay clause. This is a particular case of
the OSI model because it does not require interac- the differences between the two FDTs: using one
tions to be specified between adjacent entities of them time dependent synchronous systems can
(entities which, inside OSI architecture, are at two be specified, using the other it is not possible.
contiguous layers) but only between peer entities In the framework of the OSI model, examples
(entities of the same OSI layer but on remote in which temporal notions are needed may be
machines). In any case this mechanism needs a found in the lower layers. In order to cope with
formalization when the protocols specified are to message losses, in these protocols a mechanism is
be implemented by derivation, needed which warns the station that when a cer-
Point-to-point versus multicast. By 'point-to- rain period of time has elapsed after the transmis-
point (or symmetric) communication' we intend a sion, a message will be considered lost. The time
communication mechanism in which only two en- period can be specified to a sufficient degree
A. Fantechi et al. / Formal Protocol Descriptions 17
the integration of such tools in an environment [2] ISO Information Processing Systems - Open System
which would support a complete comparison lnterconnection,
Estelle: A Formal Description Technique
Based on an Extended State Transition Model, DIS 9074
method. (1987).
[3] 1SO - Information Processing Systems - Open System
lnterconnection, LOTOS, A Formal Description Technique
Acknowledgements Based on the Temporal Ordering of Observational Be-
haviour, DIS 8807 (1987).
We wish to acknowledge C. Peters for her [41 R. Milner, A. Calculus ofCommunicatingSystems, Lecture
Notes in Computer Science No. 92 (Springer Verlag, New
careful revision of our English. York, 1980).
The work of C. Laneve has been partially sup- [51 A. Fantechi, S. Gnesi and C. Laneve, Comparing LOTOS
ported by Ing. C. Olivetti S.p.A. with an under- and Estelle Formal Descriptions, EUTECO'88 Conference
Proceedings, Wien, April 1988 (North-Holland, Amster-
graduate fellowship, dam).