Object Protocols as Functional Parsers

  • Authors:
  • Gert Florijn

  • Affiliations:
  • -

  • Venue:
  • ECOOP '95 Proceedings of the 9th European Conference on Object-Oriented Programming
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

A service definition is an abstract specification of the behavior of a software component. It provides the interface between the users of an object and its (hidden) implementation. A protocol can be a part of a service definition. It captures the conditions under which interface operations can be invoked. This is of use for the designers of clients, but also for implementers of the service, at least if the protocol mechanism provides automatic (static or dynamic) acceptability checking of invocations or messages. Existing protocol formalisms are mostly based on finite state machines that describe legal orderings of messages. This is too limited, however, to model more complex services or to handle conditions that go beyond the ordering (such as access-control or time-dependencies) without referring to a service implementation.In this paper we explore a grammar-based approach to protocol definition, i.e. we define protocols as non-deterministic grammars extended with provisions for parallellism. The resulting protocols not only define legal message sequences but can also impose context-sensitive constraints on properties of messages, like its sender or a time stamp. Protocotols are truly abstract, i.e. independent of the implementation of a service. Since we want to investigate the kinds of constructs needed in specifying protocols we do not introduce a new notation, but instead express protocols as parsers written in a lazy functional language using a technique called combinator parsing. Besides giving a complete picture of the semantics of the constructs this also allows us to show how dynamic protocol checking can be provided. The approach is illustrated through several examples and its potential and limitations are discussed.