Test
Dynamic logic associates to every proposition an action called a test. When holds, the test acts as a NOP, changing nothing while allowing the action to move on. When is false, acts as BLOCK. Tests can be axiomatized as follows.
A8.
The corresponding theorem for is:
T8.
The construct if p then a else b is realized in dynamic logic as . This action expresses a guarded choice: if holds then is equivalent to, whereas is equivalent to BLOCK, and is equivalent to . Hence when is true the performer of the action can only take the left branch, and when is false the right.
The construct while p do a is realized as . This performs zero or more times and then performs . As long as remains true, the at the end blocks the performer from terminating the iteration prematurely, but as soon as it becomes false, further iterations of the body are blocked and the performer then has no choice but to exit via the test .
Read more about this topic: Dynamic Logic (modal Logic)
Famous quotes containing the word test:
“Wild roses, at your back porch, break their blood,
And bud to test surprises of sea air,”
—Howard Moss (b. 1922)
“We do not quite say that the new is more valuable because it fits in; but its fitting in is a test of its valuea test, it is true, which can only be slowly and cautiously applied, for we are none of us infallible judges of conformity.”
—T.S. (Thomas Stearns)
“The first reading of a Will, where a person dies worth anything considerable, generally affords a true test of the relations love to the deceased.”
—Samuel Richardson (16891761)