12 An Algebraic-Temporal Specification of a CSMA/CD-Protocol Mohamed Jmaiel Technische Universitiit Berlin Sekr. FR 5-13, Franklinstr. 28/29, D-10587 Berlin Tel. +49 30 314 21763, Fax. +49 30 314 73623. email: mojm@cs. tu--berlin.de Abstract This paper presents a formal development of a CSMA/CD (Carrier Sense, Multiple Access with Collision Detection) protocol. Using a combination of temporal logic and algebraic specifications we describe the message layout and the behavioral aspects of the protocol in a unified framework. We benefit from the deduction system of temporal logic to establish safety and liveness properties of the protocol. Keywords Communication protocols, formal methods, stepwise development, refinements, algebraic specifications, and temporal logic. 1 INTRODUCTION A distributed system consists of a set of agents that execute independently and interact with each other in order to exchange data. The programs that are responsible for the realization of a reliable data exchange within a distributed system are called communication protocols. Usually, communication protocols exhibit extremely intricate behavior, since they must cope with the possibility of failures in the physical components. Due to their complexity, the development of protocols is considered as a hard task and should follow rigorous formal techniques, in order to ensure correct implementations. In this context, the formal specification of protocols is of particular importance, since it is the basis of a correct implementation. In this paper, we deal with the specification of a CSMA/CD protocol at a very high level of abstraction. For this purpose, we make use of a recently proposed specification and verification technique based on a unification of algebraic and temporal specifications (Jmaiel & Pepper 1994). Many different formal languages have been developed and applied to the description of protocols. The most important approaches are finite state machines, CSP (Hoare 1985), CCS (Milner 1980), Petri nets (Petri 1962), and temporal logic. However, the majority of the developed languages consider only the description of the behavioral aspect of a protocol, whereas the data aspect of protocols is treated P. Dembiński et al. (eds.), Protocol Specification, Testing and Verification XV © IFIP International Federation for Information Processing 1996