A Technique for Distributed Systems Specification zy J.A. Troyano J. Torres M. Toro Dpto. de Lenguajes y Sistemas Informiticos Universidad de Sevilla Avd. Reina Mercedes s/n e-mail: zyxwvut { t royano zyxwvu j t orres ,mt oro} @obelix.cica.es Abstract zyxwvutsr In this paper we show how an object-oriented speci- fication language is usefvl zyxwvutsrqpo for the specification of dis- tributed systems. The main constructors in this lan- guage are the objects. An object consists of zyxwvutsr a state, a behaviour and a set of transition rules between states. The specification is composed by three sections: defi- nition of algebraic data types to represent the domain of object attributes, definition of classes that group ob- jects with common features, and definition of relation- ships among classes. We show two possible styles for defining the behaviour of objects, in one hand we use a transition system (state oriented) and in the other hand we use an algebraic model of processes descrip- tion (constraint oriented). We illustrate the paper with the specification of the dining philosophers problem, a typical example in distributed programming. 1 Introduction A distributed processing system is one in which se- veral processing units cooperate in order to achieve a common objective zyxwvutsrq [7]. These units are coordinated and interchange information among them. The inherent complexity of distributed systems makes indispensable the use of formal techniques in the design of such systems. The formal description techniques (FDT) surged in the environment of the specification of protocols with the objective of design- ing systems utilizing a systematic methodology. The fundamental idea is to obtain clear languages, concise and without ambiguities, that permit the specification of distributed systems. In this sense, were developed the formal description techniques LOTOS [3] and E5 telle [4]. We will use the word model in order to denote an 1066-6192/95 $4.00 0 1995 IEEE abstract representation of a system. The model of a distributed system should pick up the characteristics of concurrence, communication and synchronization that appears in a natural way in this type of systems. Through the model, we will describe the individual behaviour of the elements of the system and the form in which these elements are related among them. A natural way to describe the system model is pro- vided by the object-oriented methodology. So, we will associate an object to each one of the system’s ele- ments and we will establish the relationships among them. Furthermore, the object-oriented model pro- vides other abstraction facilities like classification and inheritance. We show with the specification of the dining philosophers problem how an object-oriented language is useful for the specification of distributed systems. The organization of this paper is as follows. This in- troduction constitutes the first section. In second sec- tion are presented the features of the object-oriented model. Third section describes the general structure of a specification in TESORO, an object-oriented speci- fication language. In fourth section simple classes are presented. Fifth section presents algebraic abstract data types as a way for representing object attributes. In sixth section we describe the relationships among classes. Seventh section presents complex classes. In eighth section we show two distinct specification styles for the objects behaviour. In nineth section we extract conclussions and expound future work. 2 The object-oriented model When we make a system model, we can get the benefit of the structure imposed by the system. The components of a system are interrelated and are in- terdependent; a set of independent components does 563