Abstract
Both the theories of binary relations and multi-sets (or bags) in Z have been usefully applied to software specification and development. In this paper we examine a useful theory—multi-relations—which is a cross between these two theories. One way of viewing relations is as sets of pairs. Here, by analogy, we view multi-relations as multi-sets of pairs, and we define multirelation equivalents of most of the traditional operators defined on binary relations. Multi-relations can also be viewed as graphs or two-dimensional matrices (with indices over arbitrary sets).
The use of multi-relations is illustrated by specifying a bill-of-materials system. This provides a good example of the paradigm of building a suitable mathematical theory first and then developing a specification in terms of the theory.
Similar content being viewed by others
References
Dahl, O.-J.: Can program proving be made practical? In: Amirchahy, M., Neel, D. (eds.) EEC-crest course on programming foundations, pp. 57–114. B.P.105 78150 Le Chesnay France: IRIA 1977
Deo, N.: Graph theory with applications to engineering and computer science. Englewood Cliffs, NJ: Prentice Hall 1974
Hayes, I.J. (ed.): Specification case studies. Englewood Cliffs, NJ: Prentice Hall 1987
Hayes, I.J.: A generalisation of bags in Z. In: Nicholls, J.E. (ed.) Z user workshop: Proceedings of the Fourth Annual Z User Meeting, Oxford 1989, pp. 113–127. Berlin Heidelberg New York: Springer 1990
Jones, C.B.: Software development: A rigorous approach. Englewood Cliffs, NJ: Prentice Hall 1980
Jones, C.B.: Systematic software development using VDM, 2nd edn. Englewood Cliffs, NJ: Prentice Hall 1990
Jones, C.B.: Constructing a theory of a data structure as an aid to program development. Acta Inf.11, 119–137 (1979)
Spivey, J.M.: The Z notation: A reference manual. Englewood Cliffs, NJ: Prentice Hall 1989
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Hayes, I. Multi-relations in Z. Acta Informatica 29, 33–62 (1992). https://doi.org/10.1007/BF01178565
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF01178565