ArticleslgStudy

computer science

Z notation

Z notation is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Z notation rather than just read about it. In short: The Z notation is a formal specification language used for describing and modelling computing systems. It is targeted at the clear specification of computer programs and computer-based systems in general.

Z notation — main illustration
Z notation — illustration

Key takeaways

  • Z notation belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Z notation to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Z notation from memory before moving on to harder problems.

Reference excerpt

The Z notation is a formal specification language used for describing and modelling computing systems. It is targeted at the clear specification of computer programs and computer-based systems in general.

History

In 1974, Jean-Raymond Abrial published "Data Semantics". He used a notation that would later be taught in the University of Grenoble until the end of the 1980s. While at EDF (Électricité de France), working with Bertrand Meyer, Abrial also worked on developing Z. Z was originally proposed by Abrial in 1977 with the help of Steve Schuman and Bertrand Meyer. The Z notation is used in the 1980 book Méthodes de programmation. Z was developed further at the Programming Research Group at Oxford University, where Abrial worked in the early 1980s with researchers including Bernard Sufrin and Ib Holm Sørensen (1949–2012), having arrived at Oxford in September 1979. Sørensen received a DPhil degree from Oxford University in 1981 on early Z-based research. He taught early courses in Z notation at Oxford and established the Z User Meeting series, initially in Oxford. Ib Holm Sørensen led the Transaction Processing Project at Oxford University from its inception in 1982 (later renamed the "CICS Project",), in collaboration with IBM Hursley. The project formally specified parts of IBM's CICS transaction processing software using Z notation. This won a Queen's Award for Technological Achievement in 1992. As part of the CICS project, Sørensen extended Edsger Dijkstra's Guarded Command Language by allowing the use of Z-schema notation as abstract commands. These ideas were later formalized by Carroll Morgan in his refinement calculus. Z schema boxes were added by Carroll Morgan for the structuring of larger specifications. Ian Hayes edited the 1987 book Specification Case Study on the use of Z (2nd edition published in 1993), with contributions from Morgan, Sørensen, Sufrin, and others. A de facto standard for Z was produced as a book by Mike Spivey in 1989 (2nd edition, 1992). Abrial has said that Z is so named "Because it is the ultimate language!" although the name "Zermelo" is also associated with the Z notation through its use of Zermelo–Fraenkel set theory.

Usage and notation Z is based on the standard mathematical notation used in axiomatic set theory, lambda calculus, and first-order predicate logic. All expressions in Z notation are typed, thereby avoiding some of the paradoxes of naive set theory. Z contains a standardized catalogue (called the mathematical toolkit) of commonly used mathematical functions and predicates, defined using Z itself. It is augmented with Z schema boxes, which can be combined using their own operators, based on standard logical operators, and also by including schemas within other schemas. This allows Z specifications to be built up into large specifications in a convenient manner.

Z User Group

In 1985, a series of Z Users Meetings was instigated by Ib Sørensen, initially at Rewley House in Oxford. In 1992, the Z User Group (ZUG) was established at one of these meetings to oversee activities concerning the Z notation, especially meetings and conferences. ZUG continued to organize regular Z User Workshops/Meetings (ZUM). Later, when they began to be held outside the United Kingdom, these became known as the International Conference of Z Users. Later still, these conferences were combined to cover the B-Method as well, becoming known as the International Conference of B and Z Users (ZB).

Standards ISO completed a Z standardization effort in 2002. This standard and a technical corrigendum are available from ISO free:

the standard is publicly available freely from ISO ITTF and, separately, available for purchase from the ISO site; the technical corrigendum is available freely from ISO. Because Z notation uses many non-ASCII symbols, the specification includes suggestions for rendering the Z notation symbols in ASCII and in LaTeX. There are also Unicode encodings for all standard Z symbols.

Award In 1992, Oxford University Computing Laboratory and IBM were jointly awarded The Queen's Award for Technological Achievement "for the development of ... the Z notation, and its application in the IBM Customer Information Control System (CICS) product."

Further reading Spivey, John Michael (1992). The Z Notation: A reference manual. International Series in Computer Science (2nd ed.). Prentice Hall. Archived from the original on 8 December 2019. Retrieved 24 March 2020. Davies, Jim; Woodcock, Jim (1996). Using Z: Specification, Refinement and Proof. International Series in Computer Science. Prentice Hall. ISBN 0-13-948472-8. Archived from the original on 5 April 2007. Retrieved 22 March 2006. Bowen, Jonathan (1996). Formal Specification and Documentation using Z: A Case Study Approach. International Thomson Computer Press, International Thomson Publishing. ISBN 1-85032-230-9. Jacky, Jonathan (1997). The Way of Z: Practical Programming with Formal Methods. Cambridge University Press. ISBN 0-521-55976-6. Ince, D. C. (1993). An Introduction to Discrete Mathematics, Formal System Specification, and Z. Oxford University Press. doi:10.1093/oso/9780198538370.001.0001. ISBN 978-0198538370.

See also Z User Group (ZUG) Community Z Tools (CZT) project Other formal methods (and languages using formal specifications): VDM-SL, the main alternative to Z B-Method, developed by Jean-Raymond Abrial (creator of Z notation) Z++ and Object-Z, object extensions for the Z notation Alloy, a specification language inspired by Z notation and implementing the principles of Object Constraint Language (OCL) Fastest, a model-based testing tool for the Z notation Unified Modeling Language, a software system design modeling tool by Object Management Group

References

Illustrations

Z notation: An example of a formal specification (in Spanish) using the Z notation, with named schema boxes, including declarations and predicates
An example of a formal specification (in Spanish) using the Z notation, with named schema boxes, including declarations and predicates
Z notation: Jean-Raymond Abrial, the main originator of the Z notation
Jean-Raymond Abrial, the main originator of the Z notation

Worked examples

Example 1 — a first encounter with Z notation

Start with the simplest possible case. Write down what Z notation claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Z notation before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Z notation ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Z notation

In research
Z notation appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Z notation in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Z notation is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer-related introductions in 1977, Formal specification languages, Oxford University Computing Laboratory, so understanding it makes those chapters shorter.
In everyday life
Look for Z notation outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Z notation” →

How to study Z notation in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Z notation means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Z notation out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Z notation in simple terms?

The Z notation is a formal specification language used for describing and modelling computing systems. It is targeted at the clear specification of computer programs and computer-based systems in general.

Why does Z notation matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Z notation?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Z notation.

Tags

  • Computer-related introductions in 1977
  • Formal specification languages
  • Oxford University Computing Laboratory
  • Specification languages
  • Z notation

Keep exploring