Abstract
A strategy for the rapid prototyping of Z specifications is described. The semantics of Z are captured in a library of Prolog rules based on a standard specification of the language constructs. Each Z schema is translated directly into a Prolog rule which is then transformed for efficiency. A classical generate-and-test form is used to mirror the structure of a schema; goals resulting from the schema variable declarations are used to generate candidate instantiations, and goals resulting from the schema predicate part are used to test the instantiations for required properties. The incompleteness of the Prolog search strategy limits the approach to the use of finite sets. Negation by failure places limitations on the kinds of transformation that can be applied. A set of tools is being developed to explore the potential of this approach for the animation of Z specifications. These tools include a Z-to-Prolog translator, a transformation aid, and an animator. Initial experiments with the transformation tool suggest that the approach can offer more than simple animation; execution of the Prolog can also be used to check logical consistency and non-determinism.
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
A. J. J. Dick & P. J. Krause [ 1989 ], “Computer Aided Transformation of Prolog Specifications”, Tech. Report 10–1702, Racal Research Ltd., Worton Drive, Reading
I. Hayes (Ed.) [1987], “Specification Case Studies”, Prentice Hall
R. D. Knott and P. J. Krause [ 1988a ], “An approach to animating Z using Prolog” Report A1.1, Alvey Project SE/065, Dept. Maths, Univ. Surrey.
R. D. Knott and P. J. Krause [ 1988b ], “LIBRARY SYSTEM: an example of rapid prototyping of a Z specification in Prolog” Report A1.2, Alvey Project SE/ 065, Dept. Maths, Univ. Surrey.
P. J. Krause, R. D. Knott and P. J. Byers [ 1989 ], “Lift System Animation” Report A2.1, Alvey Project SE/065, Dept. Maths, Univ. Surrey.
J. W. Lloyd [ 1984 ] “Foundations of Logic Programming”, Springer Verlag
G. A. Ringwood [ 1989 ], “A Comparative Study of Concurrent Logic Languages”, Knowledge Engineering Review, 4 (to appear)
J. M. Spivey [ 1988 ], “Understanding Z: a Specification Language and its Formal Semantics” Cambridge Univ. Press
J. M. Spivey [ 1989 ], “The Z Notation: a Reference Manual”, Prentice Hall
S. Stepney and S. P. Lord [ 1987 ], “Formal Specification of an Access Control System”, Software Practice and Experience, 17, pp. 575–593
L. Stirling and E. Shapiro [ 1986 ], “The Art of Prolog”, MIT Press
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
Dick, A.J.J., Krause, P.J., Cozens, J. (1990). Computer Aided Transformation of Z into Prolog. In: Nicholls, J.E. (eds) Z User Workshop. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3877-8_5
Download citation
DOI: https://doi.org/10.1007/978-1-4471-3877-8_5
Publisher Name: Springer, London
Print ISBN: 978-3-540-19627-3
Online ISBN: 978-1-4471-3877-8
eBook Packages: Springer Book Archive