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
21 - Graphical user interface
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
This chapter presents a more realistic model for the graphical user interface we introduced in Chapter 6. It is based on the control console of a real medical device, but the same techniques can be applied to any system where the operator uses a pointing device such as a mouse to select items from on-screen windows and menus, and uses a keyboard to enter information into dialog boxes. Such facilities are provided by many software systems in wide use today, for example the X window system.
A graphical user interface is an example of a state transition system driven by events. This chapter explains how to model event-driven state transition systems in Z, and shows how to illustrate a Z text with a kind of state transition diagram called a statechart. This chapter also shows how to use Z to express designs that are partitioned into units or modules that are largely independent. In Z these units can include both data and the operations that act on it, so they can represent classes in object-oriented programming.
Events
A great advantage of a graphical user interface is that it allows the users to choose operations in whatever order makes the most sense to them, it does not force users through a fixed sequence determined by the designers. All operations are always potentially available, although some operations might have to be disabled at certain times.
- Type
- Chapter
- Information
- The Way of ZPractical Programming with Formal Methods, pp. 199 - 210Publisher: Cambridge University PressPrint publication year: 1996