Abstract
As a mathematical theory for use in specification, bags (in Z) are currently a poor cousin to the better known and more widely used theories such as sets, relations, functions and sequences. By both expanding the range of operators available on bags, and generalising the basic notion of bags themselves, bags can be turned into a more useful theory that is applicable to a wider range of problems.
The generalisation of bags introduced in this paper allows the frequency of occurrence of an element in a bag to be negative, as well as the usual zero or positive. The operators on bags generalise neatly to negative frequencies. Use of the generalised bags is illustrated by the examples of modelling a simple banking system and physical units.
Copyright © I. J. Hayes, 1989.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
I. J. Hayes, editor. Specification Case Studies. Prentice Hall International, 1987.
J. M. Spivey. The Z Notation: A Reference Manual. Prentice Hall International, 1989.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1990 Springer-Verlag London
About this paper
Cite this paper
Hayes, I. (1990). A Generalisation of Bags in Z. In: Nicholls, J.E. (eds) Z User Workshop. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3877-8_7
Download citation
DOI: https://doi.org/10.1007/978-1-4471-3877-8_7
Publisher Name: Springer, London
Print ISBN: 978-3-540-19627-3
Online ISBN: 978-1-4471-3877-8
eBook Packages: Springer Book Archive