# Dynamic logic (modal logic)

(Redirected from Propositional dynamic logic)
For the subject in digital electronics also known as clocked logic, see dynamic logic (digital electronics).

Dynamic logic is an extension of modal logic originally intended for reasoning about computer programs and later applied to more general complex behaviors arising in linguistics, philosophy, AI, and other fields.

## Language

Modal logic is characterized by the modal operators ${\displaystyle \Box p}$ (box p) asserting that ${\displaystyle p\,\!}$ is necessarily the case, and ${\displaystyle \Diamond p}$ (diamond p) asserting that ${\displaystyle p\,\!}$ is possibly the case. Dynamic logic extends this by associating to every action ${\displaystyle a\,\!}$ the modal operators ${\displaystyle [a]\,\!}$ and ${\displaystyle \langle a\rangle \,\!}$, thereby making it a multimodal logic. The meaning of ${\displaystyle [a]p\,\!}$ is that after performing action ${\displaystyle a\,\!}$ it is necessarily the case that ${\displaystyle p\,\!}$ holds, that is, ${\displaystyle a\,\!}$ must bring about ${\displaystyle p\,\!}$. The meaning of ${\displaystyle \langle a\rangle p\,\!}$ is that after performing ${\displaystyle a\,\!}$ it is possible that ${\displaystyle p\,\!}$ holds, that is, ${\displaystyle a\,\!}$ might bring about ${\displaystyle p\,\!}$. These operators are related by ${\displaystyle [a]p\equiv \neg \langle a\rangle \neg p\,\!}$ and ${\displaystyle \langle a\rangle p\equiv \neg [a]\neg p\,\!}$, analogously to the relationship between the universal (${\displaystyle \forall \,\!}$) and existential (${\displaystyle \exists \,\!}$) quantifiers.

Dynamic logic permits compound actions built up from smaller actions. While the basic control operators of any programming language could be used for this purpose, Kleene's regular expression operators are a good match to modal logic. Given actions ${\displaystyle a\,\!}$ and ${\displaystyle b\,\!}$, the compound action ${\displaystyle a\cup b\,\!}$, choice, also written ${\displaystyle a+b\,\!}$ or ${\displaystyle a|b\,\!}$, is performed by performing one of ${\displaystyle a\,\!}$ or ${\displaystyle b\,\!}$. The compound action ${\displaystyle a;b\,\!}$, sequence, is performed by performing first ${\displaystyle a\,\!}$ and then ${\displaystyle b\,\!}$. The compound action ${\displaystyle a*\,\!}$, iteration, is performed by performing ${\displaystyle a\,\!}$ zero or more times, sequentially. The constant action ${\displaystyle 0\,\!}$ or BLOCK does nothing and does not terminate, whereas the constant action ${\displaystyle 1\,\!}$ or SKIP or NOP, definable as ${\displaystyle 0*\,\!}$, does nothing but does terminate.

## Axioms

These operators can be axiomatized in dynamic logic as follows, taking as already given a suitable axiomatization of modal logic including such axioms for modal operators as the above-mentioned axiom ${\displaystyle [a]p\equiv \neg \langle a\rangle \neg p\,\!}$ and the two inference rules modus ponens (${\displaystyle \vdash p\!}$ and ${\displaystyle \vdash p\to q\!}$ implies ${\displaystyle \vdash q\,\!}$) and necessitation (${\displaystyle \vdash p\!}$ implies ${\displaystyle \vdash [a]p\,\!}$).

A1. ${\displaystyle [0]p\,\!}$

A2. ${\displaystyle [1]p\equiv p\,\!}$

A3. ${\displaystyle [a\cup b]p\equiv [a]p\land [b]p\,\!}$

A4. ${\displaystyle [a;b]p\equiv [a][b]p\,\!}$

A5. ${\displaystyle [a*]p\equiv p\land [a][a*]p\,\!}$

A6. ${\displaystyle p\land [a*](p\to [a]p)\to [a*]p\,\!}$

Axiom A1 makes the empty promise that when BLOCK terminates, ${\displaystyle p\,\!}$ will hold, even if ${\displaystyle p\,\!}$ is the proposition false. (Thus BLOCK abstracts the essence of the action of hell freezing over.)
A2 says that [NOP] acts as the identity function on propositions, that is, it transforms ${\displaystyle p\,\!}$ into itself.
A3 says that if doing one of ${\displaystyle a\,\!}$ or ${\displaystyle b\,\!}$ must bring about ${\displaystyle p\,\!}$, then ${\displaystyle a\,\!}$ must bring about ${\displaystyle p\,\!}$ and likewise for ${\displaystyle b\,\!}$, and conversely.
A4 says that if doing ${\displaystyle a\,\!}$ and then ${\displaystyle b\,\!}$ must bring about ${\displaystyle p\,\!}$, then ${\displaystyle a\,\!}$ must bring about a situation in which ${\displaystyle b\,\!}$ must bring about ${\displaystyle p\,\!}$.
A5 is the evident result of applying A2, A3 and A4 to the equation ${\displaystyle a*=1\cup a;a*\,\!}$ of Kleene algebra.
A6 asserts that if ${\displaystyle p\,\!}$ holds now, and no matter how often we perform ${\displaystyle a\,\!}$ it remains the case that the truth of ${\displaystyle p\,\!}$ after that performance entails its truth after one more performance of ${\displaystyle a\,\!}$, then ${\displaystyle p\,\!}$ must remain true no matter how often we perform ${\displaystyle a\,\!}$. A6 is recognizable as mathematical induction with the action n := n+1 of incrementing n generalized to arbitrary actions ${\displaystyle a\,\!}$.

## Derivations

The modal logic axiom ${\displaystyle [a]p\equiv \neg \langle a\rangle \neg p\,\!}$ permits the derivation of the following six theorems corresponding to the above:

T1. ${\displaystyle \neg \langle 0\rangle p\,\!}$

T2. ${\displaystyle \langle 1\rangle p\equiv p\,\!}$

T3. ${\displaystyle \langle a\cup b\rangle p\equiv \langle a\rangle p\lor \langle b\rangle p\,\!}$

T4. ${\displaystyle \langle a;b\rangle p\equiv \langle a\rangle \langle b\rangle p\,\!}$

T5. ${\displaystyle \langle a*\rangle p\equiv p\lor \langle a\rangle \langle a*\rangle p\,\!}$

T6. ${\displaystyle \langle a*\rangle p\to p\lor \langle a*\rangle (\neg p\land \langle a\rangle p)\,\!}$

T1 asserts the impossibility of bringing anything about by performing BLOCK.
T2 notes again that NOP changes nothing, bearing in mind that NOP is both deterministic and terminating whence ${\displaystyle [1]\,\!}$ and ${\displaystyle \langle 1\rangle \,\!}$ have the same force.
T3 says that if the choice of ${\displaystyle a\,\!}$ or ${\displaystyle b\,\!}$ could bring about ${\displaystyle p\,\!}$, then either ${\displaystyle a\,\!}$ or ${\displaystyle b\,\!}$ alone could bring about ${\displaystyle p\,\!}$.
T4 is just like A4.
T5 is explained as for A5.
T6 asserts that if it is possible to bring about ${\displaystyle p\,\!}$ by performing ${\displaystyle a\,\!}$ sufficiently often, then either ${\displaystyle p\,\!}$ is true now or it is possible to perform ${\displaystyle a\,\!}$ repeatedly to bring about a situation where ${\displaystyle p\,\!}$ is (still) false but one more performance of ${\displaystyle a\,\!}$ could bring about ${\displaystyle p\,\!}$.

Box and diamond are entirely symmetric with regard to which one takes as primitive. An alternative axiomatization would have been to take the theorems T1-T6 as axioms, from which we could then have derived A1-A6 as theorems.

The difference between implication and inference is the same in dynamic logic as in any other logic: whereas the implication ${\displaystyle p\to q\,\!}$ asserts that if ${\displaystyle p\,\!}$ is true then so is ${\displaystyle q\,\!}$, the inference ${\displaystyle p\vdash q\,\!}$ asserts that if ${\displaystyle p\,\!}$ is valid then so is ${\displaystyle q\,\!}$. However the dynamic nature of dynamic logic moves this distinction out of the realm of abstract axiomatics into the common-sense experience of situations in flux. The inference rule ${\displaystyle p\vdash [a]p\,\!}$, for example, is sound because its premise asserts that ${\displaystyle p\,\!}$ holds at all times, whence no matter where ${\displaystyle a\,\!}$ might take us, ${\displaystyle p\,\!}$ will be true there. The implication ${\displaystyle p\to [a]p\,\!}$ is not valid, however, because the truth of ${\displaystyle p\,\!}$ at the present moment is no guarantee of its truth after performing ${\displaystyle a\,\!}$. For example, ${\displaystyle p\to [a]p\,\!}$ will be true in any situation where ${\displaystyle p\,\!}$ is false, or in any situation where ${\displaystyle [a]p\,\!}$ is true, but the assertion ${\displaystyle (x=1)\to [x:=x+1](x=1)\,\!}$ is false in any situation where ${\displaystyle x\,\!}$ has value 1, and therefore is not valid.

## Derived rules of inference

As for modal logic, the inference rules modus ponens and necessitation suffice also for dynamic logic as the only primitive rules it needs, as noted above. However, as usual in logic, many more rules can be derived from these with the help of the axioms. An example instance of such a derived rule in dynamic logic is that if kicking a broken TV once can't possibly fix it, then repeatedly kicking it can't possibly fix it either. Writing ${\displaystyle k\,\!}$ for the action of kicking the TV, and ${\displaystyle b\,\!}$ for the proposition that the TV is broken, dynamic logic expresses this inference as ${\displaystyle b\to [k]b\vdash b\to [k*]b\,\!}$, having as premise ${\displaystyle b\to [k]b\,\!}$ and as conclusion ${\displaystyle b\to [k*]b\,\!}$. The meaning of ${\displaystyle [k]b\,\!}$ is that it is guaranteed that after kicking the TV, it is broken. Hence the premise ${\displaystyle b\to [k]b\,\!}$ means that if the TV is broken, then after kicking it once it will still be broken. ${\displaystyle k*\,\!}$ denotes the action of kicking the TV zero or more times. Hence the conclusion ${\displaystyle b\to [k*]b\,\!}$ means that if the TV is broken, then after kicking it zero or more times it will still be broken. For if not, then after the second-to-last kick the TV would be in a state where kicking it once more would fix it, which the premise claims can never happen under any circumstances.

The inference ${\displaystyle b\to [k]b\vdash b\to [k*]b\,\!}$ is sound. However the implication ${\displaystyle (b\to [k]b)\to (b\to [k*]b)\,\!}$ is not valid because we can easily find situations in which ${\displaystyle b\to [k]b\,\!}$ holds but ${\displaystyle b\to [k*]b\,\!}$ does not. In any such counterexample situation, ${\displaystyle b\,\!}$ must hold but ${\displaystyle [k*]b\,\!}$ must be false, while ${\displaystyle [k]b\,\!}$ however must be true. But this could happen in any situation where the TV is broken but can be revived with two kicks. The implication fails (is not valid) because it only requires that ${\displaystyle b\to [k]b\,\!}$ hold now, whereas the inference succeeds (is sound) because it requires that ${\displaystyle b\to [k]b\,\!}$ hold in all situations, not just the present one.

An example of a valid implication is the proposition ${\displaystyle (x\geq 3)\to [x:=x+1](x\geq 4)\,\!}$. This says that if ${\displaystyle x\,\!}$ is greater or equal to 3, then after incrementing ${\displaystyle x\,\!}$, ${\displaystyle x\,\!}$ must be greater or equal to 4. In the case of deterministic actions ${\displaystyle a\,\!}$ that are guaranteed to terminate, such as ${\displaystyle x:=x+1\,\!}$, must and might have the same force, that is, ${\displaystyle [a]\,\!}$ and ${\displaystyle \langle a\rangle \,\!}$ have the same meaning. Hence the above proposition is equivalent to ${\displaystyle (x\geq 3)\to \langle x:=x+1\rangle (x\geq 4)\,\!}$ asserting that if ${\displaystyle x\,\!}$ is greater or equal to 3 then after performing ${\displaystyle x:=x+1\,\!}$, ${\displaystyle x\,\!}$ might be greater or equal to 4.

## Assignment

The general form of an assignment statement is ${\displaystyle x:=e\,\!}$ where ${\displaystyle x\,\!}$ is a variable and ${\displaystyle e\,\!}$ is an expression built from constants and variables with whatever operations are provided by the language, such as addition and multiplication. The Hoare axiom for assignment is not given as a single axiom but rather as an axiom schema.

A7. ${\displaystyle [x:=e]\Phi (x)\equiv \Phi (e)\,\!}$

This is a schema in the sense that ${\displaystyle \Phi (x)\,\!}$ can be instantiated with any formula ${\displaystyle \Phi \,\!}$ containing zero or more instances of a variable ${\displaystyle x\,\!}$. The meaning of ${\displaystyle \Phi (e)\,\!}$ is ${\displaystyle \Phi \,\!}$ with those occurrences of ${\displaystyle x\,\!}$ that occur free in ${\displaystyle \Phi \,\!}$, i.e. not bound by some quantifier as in ${\displaystyle \forall x\,\!}$, replaced by ${\displaystyle e\,\!}$. For example, we may instantiate A7 with ${\displaystyle [x:=e](x=y^{2})\equiv e=y^{2}\,\!}$, or with ${\displaystyle [x:=e](b=c+x)\equiv b=c+e\,\!}$. Such an axiom schema allows infinitely many axioms having a common form to be written as a finite expression connoting that form.

The instance ${\displaystyle [x:=x+1](x\geq 4)\equiv (x+1)\geq 4\,\!}$ of A7 allows us to calculate mechanically that the example ${\displaystyle [x:=x+1]x\geq 4\,\!}$ encountered a few paragraphs ago is equivalent to ${\displaystyle (x+1)\geq 4\,\!}$, which in turn is equivalent to ${\displaystyle x\geq 3\,\!}$ by elementary algebra.

An example illustrating assignment in combination with ${\displaystyle *\,\!}$ is the proposition ${\displaystyle \langle (x:=x+1)*\rangle x=7\,\!}$. This asserts that it is possible, by incrementing ${\displaystyle x\,\!}$ sufficiently often, to make ${\displaystyle x\,\!}$ equal to 7. This of course is not always true, e.g. if ${\displaystyle x\,\!}$ is 8 to begin with, or 6.5, whence this proposition is not a theorem of dynamic logic. If ${\displaystyle x\,\!}$ is of type integer however, then this proposition is true if and only if ${\displaystyle x\,\!}$ is at most 7 to begin with, that is, it is just a roundabout way of saying ${\displaystyle x\leq 7\,\!}$.

Mathematical induction can be obtained as the instance of A6 in which the proposition ${\displaystyle p\,\!}$ is instantiated as ${\displaystyle \Phi (n)\,\!}$, the action ${\displaystyle a\,\!}$ as ${\displaystyle n:=n+1\,\!}$, and ${\displaystyle n\,\!}$ as ${\displaystyle 0\,\!}$. The first two of these three instantiations are straightforward, converting A6 to ${\displaystyle (\Phi (n)\land [(n:=n+1)*](\Phi (n)\to [n:=n+1]\Phi (n)))\to [(n:=n+1)*]\Phi (n)\,\!}$. However, the ostensibly simple substitution of ${\displaystyle 0\,\!}$ for ${\displaystyle n\,\!}$ is not so simple as it brings out the so-called referential opacity of modal logic in the case when a modality can interfere with a substitution.

When we substituted ${\displaystyle \Phi (n)\,\!}$ for ${\displaystyle p\,\!}$, we were thinking of the proposition symbol ${\displaystyle p\,\!}$ as a rigid designator with respect to the modality ${\displaystyle [n:=n+1]\,\!}$, meaning that it is the same proposition after incrementing ${\displaystyle n\,\!}$ as before, even though incrementing ${\displaystyle n\,\!}$ may impact its truth. Likewise, the action ${\displaystyle a\,\!}$ is still the same action after incrementing ${\displaystyle n\,\!}$, even though incrementing ${\displaystyle n\,\!}$ will result in its executing in a different environment. However, ${\displaystyle n\,\!}$ itself is not a rigid designator with respect to the modality ${\displaystyle [n:=n+1]\,\!}$; if it denotes 3 before incrementing ${\displaystyle n\,\!}$, it denotes 4 after. So we can't just substitute ${\displaystyle 0\,\!}$ for ${\displaystyle n\,\!}$ everywhere in A6.

One way of dealing with the opacity of modalities is to eliminate them. To this end, expand ${\displaystyle [(n:=n+1)*]\Phi (n)\,\!}$ as the infinite conjunction ${\displaystyle [(n:=n+1)^{0}]\Phi (n)\land [(n:=n+1)^{1}]\Phi (n)\land [(n:=n+1)^{2}]\Phi (n)\land \ldots \,\!}$, that is, the conjunction over all ${\displaystyle i\,\!}$ of ${\displaystyle [(n:=n+1)^{i}]\Phi (n)\,\!}$. Now apply A4 to turn ${\displaystyle [(n:=n+1)^{i}]\Phi (n)\,\!}$ into ${\displaystyle [n:=n+1][n:=n+1]\ldots \Phi (n)\,\!}$, having ${\displaystyle i\,\!}$ modalities. Then apply Hoare's axiom ${\displaystyle i\,\!}$ times to this to produce ${\displaystyle \Phi (n+i)\,\!}$, then simplify this infinite conjunction to ${\displaystyle \forall i\Phi (n+i)\,\!}$. This whole reduction should be applied to both instances of ${\displaystyle [(n:=n+1)*]\,\!}$ in A6, yielding ${\displaystyle (\Phi (n)\land \forall i(\Phi (n+i)\to [n:=n+1]\Phi (n+i)))\to \forall i\Phi (n+i)\,\!}$. The remaining modality can now be eliminated with one more use of Hoare's axiom to give ${\displaystyle (\Phi (n)\land \forall i(\Phi (n+i)\to \Phi (n+i+1)))\to \forall i\Phi (n+i)\,\!}$.

With the opaque modalities now out of the way, we can safely substitute ${\displaystyle 0\,\!}$ for ${\displaystyle n\,\!}$ in the usual manner of first-order logic to obtain Peano's celebrated axiom ${\displaystyle (\Phi (0)\land \forall i(\Phi (i)\to \Phi (i+1)))\to \forall i\Phi (i)\,\!}$, namely mathematical induction.

One subtlety we glossed over here is that ${\displaystyle \forall i\,\!}$ should be understood as ranging over the natural numbers, where ${\displaystyle i\,\!}$ is the superscript in the expansion of ${\displaystyle a*\,\!}$ as the union of ${\displaystyle a^{i}\,\!}$ over all natural numbers ${\displaystyle i\,\!}$. The importance of keeping this typing information straight becomes apparent if ${\displaystyle n\,\!}$ had been of type integer, or even real, for any of which A6 is perfectly valid as an axiom. As a case in point, if ${\displaystyle n\,\!}$ is a real variable and ${\displaystyle \Phi (n)\,\!}$ is the predicate ${\displaystyle n\,\!}$ is a natural number, then axiom A6 after the first two substitutions, that is, ${\displaystyle (\Phi (n)\land \forall i(\Phi (n+i)\to \Phi (n+i+1)))\to \forall i\Phi (n+i)\,\!}$, is just as valid, that is, true in every state regardless of the value of ${\displaystyle n\,\!}$ in that state, as when ${\displaystyle n\,\!}$ is of type natural number. If in a given state ${\displaystyle n\,\!}$ is a natural number, then the antecedent of the main implication of A6 holds, but then ${\displaystyle n+i\,\!}$ is also a natural number so the consequent also holds. If ${\displaystyle n\,\!}$ is not a natural number, then the antecedent is false and so A6 remains true regardless of the truth of the consequent. We could strengthen A6 to an equivalence ${\displaystyle p\land [a*](p\to [a]p)\equiv [a*]p\,\!}$ without impacting any of this, the other direction being provable from A5, from which we see that if the antecedent of A6 does happen to be false somewhere, then the consequent must be false.

## Test

Dynamic logic associates to every proposition ${\displaystyle p\,\!}$ an action ${\displaystyle p?\,\!}$ called a test. When ${\displaystyle p\,\!}$ holds, the test ${\displaystyle p?\,\!}$ acts as a NOP, changing nothing while allowing the action to move on. When ${\displaystyle p\,\!}$ is false, ${\displaystyle p?\,\!}$ acts as BLOCK. Tests can be axiomatized as follows.

A8. ${\displaystyle [p?]q\equiv p\to q\,\!}$

The corresponding theorem for ${\displaystyle \langle p?\rangle \,\!}$ is:

T8. ${\displaystyle \langle p?\rangle q\equiv p\land q\,\!}$

The construct if p then an else b is realized in dynamic logic as ${\displaystyle (p?;a)\cup (\neg p?;b)\,\!}$. This action expresses a guarded choice: if ${\displaystyle p\,\!}$ holds then ${\displaystyle p?;a\,\!}$ is equivalent to ${\displaystyle a\,\!}$, whereas ${\displaystyle \neg p?;b\,\!}$ is equivalent to BLOCK, and ${\displaystyle a\cup 0\,\!}$ is equivalent to ${\displaystyle a\,\!}$. Hence when ${\displaystyle p\,\!}$ is true the performer of the action can only take the left branch, and when ${\displaystyle p\,\!}$ is false the right.

The construct while p do a is realized as ${\displaystyle (p?;a)*;\neg p?\,\!}$. This performs ${\displaystyle p?;a\,\!}$ zero or more times and then performs ${\displaystyle \neg p?\,\!}$. As long as ${\displaystyle p\,\!}$ remains true, the ${\displaystyle \neg p?\,\!}$ at the end blocks the performer from terminating the iteration prematurely, but as soon as it becomes false, further iterations of the body ${\displaystyle p\,\!}$ are blocked and the performer then has no choice but to exit via the test ${\displaystyle \neg p?\,\!}$.

## Quantification as random assignment

The random-assignment statement ${\displaystyle x:=?\,\!}$ denotes the nondeterministic action of setting ${\displaystyle x\,\!}$ to an arbitrary value. ${\displaystyle [x:=?]p\,\!}$ then says that ${\displaystyle p\,\!}$ holds no matter what you set ${\displaystyle x\,\!}$ to, while ${\displaystyle \langle x:=?\rangle p\,\!}$ says that it is possible to set ${\displaystyle x\,\!}$ to a value that makes ${\displaystyle p\,\!}$ true. ${\displaystyle [x:=?]\,\!}$ thus has the same meaning as the universal quantifier ${\displaystyle \forall x\,\!}$, while ${\displaystyle \langle x:=?\rangle \,\!}$ similarly corresponds to the existential quantifier ${\displaystyle \exists x\,\!}$. That is, first-order logic can be understood as the dynamic logic of programs of the form ${\displaystyle x:=?\,\!}$.

Dijkstra claimed to show the impossibility of a program that sets the value of variable x to an arbitrary positive integer.[1] However, in dynamic logic with assignment and the * operator, x can be set to an arbitrary positive integer with the dynamic logic program ${\displaystyle x:=0;(x:=x+1)*}$: hence we must either reject Dijkstra's argument or hold that the * operator is not effective.

## Possible-world semantics

Modal logic is most commonly interpreted in terms of possible world semantics or Kripke structures. This semantics carries over naturally to dynamic logic by interpreting worlds as states of a computer in the application to program verification, or states of our environment in applications to linguistics, AI, etc. One role for possible world semantics is to formalize the intuitive notions of truth and validity, which in turn permit the notions of soundness and completeness to be defined for axiom systems. An inference rule is sound when validity of its premises implies validity of its conclusion. An axiom system is sound when all its axioms are valid and its inference rules are sound. An axiom system is complete when every valid formula is derivable as a theorem of that system. These concepts apply to all systems of logic including dynamic logic.

## Propositional dynamic logic (PDL)

Ordinary or first-order logic has two types of terms, respectively assertions and data. As can be seen from the examples above, dynamic logic adds a third type of term denoting actions. The dynamic logic assertion ${\displaystyle [x:=x+1](x\geq 4)\,\!}$ contains all three types: ${\displaystyle x\,\!}$, ${\displaystyle x+1\,\!}$, and ${\displaystyle 4\,\!}$ are data, ${\displaystyle x:=x+1\,\!}$ is an action, and ${\displaystyle x\geq 4\,\!}$ and ${\displaystyle [x:=x+1](x\geq 4)\,\!}$ are assertions. Propositional logic is derived from first-order logic by omitting data terms and reasons only about abstract propositions, which may be simple propositional variables or atoms or compound propositions built with such logical connectives as and, or, and not.

Propositional dynamic logic, or PDL, was derived from dynamic logic in 1977 by Michael J. Fischer and Richard Ladner. PDL blends the ideas behind propositional logic and dynamic logic by adding actions while omitting data; hence the terms of PDL are actions and propositions. The TV example above is expressed in PDL whereas the next example involving ${\displaystyle x:=x+1\,\!}$ is in first-order DL. PDL is to (first-order) dynamic logic as propositional logic is to first-order logic.

Fischer and Ladner showed in their 1977 paper that PDL satisfiability was of computational complexity at most nondeterministic exponential time, and at least deterministic exponential time in the worst case. This gap was closed in 1978 by Vaughan Pratt who showed that PDL was decidable in deterministic exponential time. In 1977, Krister Segerberg proposed a complete axiomatization of PDL, namely any complete axiomatization of modal logic K together with axioms A1-A6 as given above. Completeness proofs for Segerberg's axioms were found by Gabbay (unpublished note), Parikh (1978), Pratt (1979), and Kozen and Parikh (1981).

## History

Dynamic logic was developed by Vaughan Pratt in 1974 in notes for a class on program verification as an approach to assigning meaning to Hoare logic by expressing the Hoare formula ${\displaystyle p\{a\}q\,\!}$ as ${\displaystyle p\to [a]q\,\!}$. The approach was later published in 1976 as a logical system in its own right. The system parallels A. Salwicki's system of algorithmic logic[2] and Edsger Dijkstra's notion of weakest-precondition predicate transformer ${\displaystyle wp(a,p)\,\!}$, with ${\displaystyle [a]p\,\!}$ corresponding to Dijkstra's ${\displaystyle wlp(a,p)\,\!}$, weakest liberal precondition. Those logics however made no connection with either modal logic, Kripke semantics, regular expressions, or the calculus of binary relations; dynamic logic therefore can be viewed as a refinement of algorithmic logic and Predicate Transformers that connects them up to the axiomatics and Kripke semantics of modal logic as well as to the calculi of binary relations and regular expressions.

## The Concurrency Challenge

Hoare logic, algorithmic logic, weakest preconditions, and dynamic logic are all well suited to discourse and reasoning about sequential behavior. Extending these logics to concurrent behavior however has proved problematic. There are various approaches but all of them lack the elegance of the sequential case. In contrast Amir Pnueli's 1977 system of temporal logic, another variant of modal logic sharing many common features with dynamic logic, differs from all of the above-mentioned logics by being what Pnueli has characterized as an "endogenous" logic, the others being "exogenous" logics. By this Pnueli meant that temporal logic assertions are interpreted within a universal behavioral framework in which a single global situation changes with the passage of time, whereas the assertions of the other logics are made externally to the multiple actions about which they speak. The advantage of the endogenous approach is that it makes no fundamental assumptions about what causes what as the environment changes with time. Instead a temporal logic formula can talk about two unrelated parts of a system, which because they are unrelated tacitly evolve in parallel. In effect ordinary logical conjunction of temporal assertions is the concurrent composition operator of temporal logic. The simplicity of this approach to concurrency has resulted in temporal logic being the modal logic of choice for reasoning about concurrent systems with its aspects of synchronization, interference, independence, deadlock, livelock, fairness, etc.

These concerns of concurrency would appear to be less central to linguistics, philosophy, and artificial intelligence, the areas in which dynamic logic is most often encountered nowadays.

For a comprehensive treatment of dynamic logic see the book by David Harel et al. cited below.

## Footnotes

1. ^ Dijkstra, E.W. (1976). A Discipline of Programming. Englewood Cliffs: Prentice-Hall Inc. p. 221. ISBN 013215871X.
2. ^ Mirkowska, Grażyna; Salwicki A. (1987). Algorithmic Logic (PDF). Warszawa & Boston: PWN & D. Reidel Publ. p. 372. ISBN 8301068590.

## References

• Vaughan Pratt, "Semantical Considerations on Floyd-Hoare Logic", Proc. 17th Annual IEEE Symposium on Foundations of Computer Science, 1976, 109-121.
• David Harel, Dexter Kozen, and Jerzy Tiuryn, "Dynamic Logic". MIT Press, 2000 (450 pp).
• David Harel, "Dynamic Logic", In D. Gabbay and F. Guenthner, editors, Handbook of Philosophical Logic, volume II: Extensions of Classical Logic, chapter 10, pages 497-604. Reidel, Dordrecht, 1984.