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:
“Tried by a New England eye, or the more practical wisdom of modern times, they are the oracles of a race already in its dotage; but held up to the sky, which is the only impartial and incorruptible ordeal, they are of a piece with its depth and serenity, and I am assured that they will have a place and significance as long as there is a sky to test them by.”
—Henry David Thoreau (18171862)
“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)
“It is commonly said ... that ridicule is the best test of truth; for that it will not stick where it is not just. I deny it. A truth learned in a certain light, and attacked in certain words, by men of wit and humour, may, and often doth, become ridiculous, at least so far, that the truth is only remembered and repeated for the sake of the ridicule.”
—Philip Dormer Stanhope, 4th Earl Chesterfield (16941773)