The third synchronizes send and receive actions: phase. These three
variables do not correspond closely to any variables in the implementation. In the
implementation, the ordering of method calls is coded in the applications that call
them.
Recall that state variables can hold data state that stores the arguments and return
values of actions. In this example, the data state is the most recently acquired
temperature.We store the data state in a single state variable. It turns out to be most
convenient to use the client??™s receive buffer clientBuffer.
The temperature is a number. All numeric types are ???infinite???: not mathematically
infinite, but too large to store every value. Any program that uses numbers is
potentially ???infinite??? (i.e., it has an ???infinite??? state space). To finitize our model, we
must limit it to a finite collection of temperatures; the smaller, the better.We decide
to use just two. We suspect that there might be defects in the implementation that
Systems with Finite Models 75
are sensitive to the number of digits, so we choose 99.9 and 100.0. These particular
values are not important; we assume that any other numbers with the same number
of digits would behave the same way. Limiting temperatures to just two values is an
example of data abstraction.
There are severalways to limit the temperature to two values.We could replace the
numeric type with an enumerated type.
Pages:
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122