1. Your run
must be different from both the run OutOfRangeMessageWhenIdle in Section 3.4
and the shortest path run found by the tool in Section 3.7. Confirm your run by
writing a unit test or by executing it in the simulator.
2. Write down a run that causes the controller to crash (throw an unhandled exception).
Confirm your run by writing a unit test or by executing it in the simulator.
Hint: see CheckMessage.
3. Show how to revise Controller.cs so the controller satisfies the safety and
liveness requirements given at the end of Section 3.1. Show each difference
(the contents and location of each statement that must be added, removed, or
changed). Hint: use the design rules given in Section 3.6.
Keep your revised program to use with exercises in chapters to come.
4 Further Reading
The concepts presented in this book are based on ideas from mathematics and
theoretical computer science. Readers certainly do not need to understand these
theoretical aspects in order to use the techniques we present. However, some may
be interested in pursuing these topics in further detail, and for these readers we can
point to the following sources of information.
The central idea of a model program that we present throughout the book is
based on the theory of abstract state machines (ASMs) conceived by Yuri Gurevich
in 1980s. An ASM is a formal way to describe the steps of an algorithm.
Pages:
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94