Skip to main content

Z and Hoare Logics

  • Conference paper
Z User Workshop, York 1991

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

Abstract

Z is gaining ground in the software development community as a specification language, but there is at present no standard way of relating a Z specification to program code. Hoare logics have been around for about 20 years. They are well understood and widely taught as a method of proving that a program meets its specification. In this paper I look at how a software development might use both techniques and both notations to provide a path from a high- level Z specification to program code. Rules and conventions for combining the two notations are given and their use is illustrated by two case studies.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  • Alagic, S., and M. A. Arbib, (1978), The Design of Well-Structured and Correct Programs, Berlin, Springer-Verlag.

    MATH  Google Scholar 

  • Baber, R.L., (1987), The Spine of Software: Designing Provably Correct Software: Theory and Practice, or a Mathematical Introduction to the Semantics of Computer Programs, Chichester, Wiley.

    Google Scholar 

  • Backhouse, R.C., (1986), Program Construction and Verification, Hemel Hempstead, Prentice Hall.

    Google Scholar 

  • Cousot, P., (1990), “Methods and Logics for Proving Programs”, in J. van Leeuwen, (ed.), Handbook of Theoretical Computer Science, vol. B, Formal Models and Semantics, Amsterdam, Elsevier, 1990, pp. 841–993.

    Google Scholar 

  • Diller, A., (1990), Z: An Introduction to Formal Methods, Chichester, Wiley.

    Google Scholar 

  • Diller, A., (1991), Relating Z Specifications and Programs Through Hoare Logics, Research Report CSR-91-3, School of Computer Science, University of Birmingham.

    Google Scholar 

  • Dromey, R.G., (1989), Program Derivation: The Development of Programs from Specifications, Wokingham, Addison-Wesley.

    MATH  Google Scholar 

  • Gilmore, S., (1991), Correctness-oriented Approaches to Software Development, Internal Report CST-76-91, Department of Computer Science, University of Edinburgh. (Also Report ECS-LFCS-91-147, Laboratory for Foundations of Computer Science, University of Edinburgh.)

    Google Scholar 

  • Gordon, M.J.C., (1988), Programming Language Theory and its Implementation: Applicative and Imperative Paradigms, Hemel Hempstead, Prentice Hall.

    Google Scholar 

  • Gries, D., (1981), The Science of Programming, Berlin, Springer-Verlag.

    MATH  Google Scholar 

  • Gumb, R.D., (1989), Programming Logics: An Introduction to Verification and Semantics, Chichester, Wiley.

    Google Scholar 

  • Hayes, I., (ed.), (1987), Specification Case Studies, Hemel Hempstead, Prentice Hall.

    Google Scholar 

  • Hoare, C.A.R., (1969), “An Axiomatic Basis for Computer Programming”, Communications of the ACM, vol. 12, pp. 576–580 and 583.

    Article  MATH  Google Scholar 

  • Hoare, C.A.R., (1971), “Procedures and Parameters: An Axiomatic Approach”, in E. Engeler (ed.), Symposium on Semantics of Algorithmic Languages, Berlin, Springer-Verlag, 1971, pp. 102–116.

    Chapter  Google Scholar 

  • Ince, D.C., (1988), An Introduction to Discrete Mathematics and Formal System Specification, Oxford, Oxford University Press.

    MATH  Google Scholar 

  • Jones, C.B., (1986), Systematic Software Development Using VDM, Hemel Hempstead, Prentice Hall.

    MATH  Google Scholar 

  • Kaldewaij, A., (1990), Programming: The Derivation of Algorithms, Hemel Hempstead, Prentice Hall.

    Google Scholar 

  • King, S., (1990), Z and the Refinement Calculus, Technical Monograph PRG-79, Oxford University Computing Laboratory.

    Google Scholar 

  • Lightfoot, D., (1991), Formal Specification Using Z, Basingstoke, Macmillan.

    Google Scholar 

  • Morgan, C., (1990), Programming from Specifications, Hemel Hempstead, Prentice Hall.

    MATH  Google Scholar 

  • Morgan, C., K. Robinson and P. Gardiner, (1988), On the Refinement Calculus, Technical Monograph PRG-70, Oxford University Computing Laboratory.

    Google Scholar 

  • Nielson, H.R., and F. Nielson, (1992), Semantics with Applications: A Formal Introduction, Chichester, Wiley.

    MATH  Google Scholar 

  • Norcliffe, A., and G. Slater, (1991), Mathematics of Software Construction, Chichester, Ellis Horwood.

    Google Scholar 

  • Potter, B., J. Sinclair and D. Till, (1991), An Introduction to Formal Specification and Z, Hemel Hempstead, Prentice Hall.

    MATH  Google Scholar 

  • Spivey, J.M., (1988), Understanding Z: A Specification Language and its Formal Semantics, Cambridge, Cambridge University Press.

    MATH  Google Scholar 

  • Spivey, J.M., (1989), The Z Notation: A Reference Manual, Hemel Hempstead, Prentice Hall.

    MATH  Google Scholar 

  • Woodcock, J.C.P., and M. Loomes, (1988), Software Engineering Mathematics: Formal Methods Demystified, London, Pitnam.

    Book  Google Scholar 

  • Wordsworth, J.B., (1988), Specification and Refinement using Z and the Guarded Command Language: A Compendium, IBM United Kingdom Laboratories Ltd., Hursley.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1992 British Computer Society

About this paper

Cite this paper

Diller, A. (1992). Z and Hoare Logics. In: Nicholls, J.E. (eds) Z User Workshop, York 1991. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3203-5_3

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3203-5_3

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19780-5

  • Online ISBN: 978-1-4471-3203-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics