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:
“No drug, not even alcohol, causes the fundamental ills of society. If were looking for the sources of our troubles, we shouldnt test people for drugs, we should test them for stupidity, ignorance, greed and love of power.”
—P.J. (Patrick Jake)
“The test of an adventure is that when youre in the middle of it, you say to yourself, Oh, now Ive got myself into an awful mess; I wish I were sitting quietly at home. And the sign that somethings wrong with you is when you sit quietly at home wishing you were out having lots of adventure.”
—Thornton Wilder (18971975)
“The test of a first-rate intelligence is the ability to hold two opposed ideas in the mind at the same time, and still retain the ability to function.”
—F. Scott Fitzgerald (18961940)