Book contents
- Frontmatter
- Contents
- Preface
- I Why Z?
- II Introducing Z
- III Elements of Z
- IV Studies in Z
- 16 Document control system
- 17 Text processing
- 18 Eight queens
- 19 Computer graphics and computational geometry
- 20 Rule-based programming
- 21 Graphical user interface
- 22 Safety-critical protection system
- 23 Modelling large systems
- 24 Object-oriented programming
- 25 Concurrency and real time
- Further reading
- V Programming with Z
- Further reading
- A Glossary of Z notation
- B Omitted features
- C Operator precedence
- D The Z mathematical tool-kit
- E Selected Laws
- F Solutions to selected exercises
- G Other formal notations
- Bibliography
- Index
23 - Modelling large systems
Published online by Cambridge University Press: 06 July 2010
- Frontmatter
- Contents
- Preface
- I Why Z?
- II Introducing Z
- III Elements of Z
- IV Studies in Z
- 16 Document control system
- 17 Text processing
- 18 Eight queens
- 19 Computer graphics and computational geometry
- 20 Rule-based programming
- 21 Graphical user interface
- 22 Safety-critical protection system
- 23 Modelling large systems
- 24 Object-oriented programming
- 25 Concurrency and real time
- Further reading
- V Programming with Z
- Further reading
- A Glossary of Z notation
- B Omitted features
- C Operator precedence
- D The Z mathematical tool-kit
- E Selected Laws
- F Solutions to selected exercises
- G Other formal notations
- Bibliography
- Index
Summary
All of our examples so far have been small: They have only a few state variables. In this chapter we tackle a large system that has hundreds of state variables. Z provides several structuring techniques that make this feasible. The system is large but the Z description is concise. It is built up from components, subsystems, conditions, and modes that are developed separately, but also accounts for behaviors that emerge at the system level. The description illustrates several useful idioms of the Z notation, including one called promotion.
The case study in this chapter is the control system for a cyclotron, a type of particle accelerator. A radiation therapy machine includes an accelerator that produces a radiation beam and therapy equipment that uses the beam. In Chapters 6, 21, and 22 we described some of the controls for the therapy equipment. Now we turn to the controls for the accelerator.
Our system is built up from many components, and most of its size derives from repetition of similar components. We can make our specification much shorter and easier to grasp by identifying the components, describing them separately, and then combining them. We will define a schema type for each kind of component. The system contains multiple copies of most kinds of components, so the system model contains multiple bindings of those schema types. Many features are common to several kinds of components, and these can be concisely represented by schemas that are included elsewhere.
- Type
- Chapter
- Information
- The Way of ZPractical Programming with Formal Methods, pp. 218 - 230Publisher: Cambridge University PressPrint publication year: 1996