

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A cheat sheet for Dynamic Logic for While Programs. It includes operators, statements, effects, and axioms of Dynamic Logic, as well as first-order axioms and sequent calculus proof rules. a comprehensive overview of Dynamic Logic for While Programs and can be used as study notes or a summary for students studying this topic.
Typology: Slides
1 / 3
This page cannot be seen from the preview
Don't miss anything!


1: Operators of Dynamic Logic for While Programs DL Operator Meaning e = ˜e equals true iff values of terms e and ˜e are equal e ≥ e˜ greater-or-equal true iff value of e greater-or-equal to value of ˜e p(e 1 ,... , ek) predicate true iff p holds for the value of (e 1 ,... , ek) ¬P negation / not true if P is false P ∧ Q conjunction / and true if both P and Q are true P ∨ Q disjunction / or true if P is true or if Q is true P → Q implication / implies true if P is false or Q is true P ↔ Q bi-implication / equivalent true if P and Q are both true or both false ∀x P universal quantifier / for all true if P is true for all real values of variable x ∃x P existential quantifier / exists true if P is true for some real value of variable x [α]P [·] modality / box true if P is true after all runs of HP α 〈α〉P 〈·〉 modality / diamond true if P is true after at least one run of HP α
2: Statements and Effects of While Programs Program Operation Effect x := e assignment assigns value of term e to variable x ?Q test check truth of first-order formula Q at current state α; β sequential composition β starts after α finishes if(Q) α else β if-then-else run α if Q is true at current state else run β while(Q) α while loop repeats α as long as Q is true α∗^ nondeterministic repetition repeats α n-times for any n ∈ N
3: Semantics of Dynamic Logic formula P in interpretation I ω |= e ≥ e˜ iff ω[[e]] ≥ ω[[˜e]] ω |= p(e 1 ,... , ek) iff (ω[[e 1 ]],... , ω[[ek]]) ∈ I(p) where predicate symbol p is interpreted as relation I(p) ω |= ¬P iff ω 6 |= P that is, it is not the case that ω |= P ω |= P ∧ Q iff ω |= P and ω |= Q ω |= P → Q iff ω 6 |= P or ω |= Q ω |= ∃x P iff ν |= P for some state ν with ν = ω except for the value of x ω |= ∀x P iff ν |= P for all states ν with ν = ω except for the value of x ω |= 〈α〉P iff ν |= P for some state ν such that (ω, ν) ∈ [[α]] ω |= [α]P iff ν |= P for all states ν such that (ω, ν) ∈ [[α]]
4: Semantics of While Program α is relation [[α]] ⊆ S × S between initial and final states
[[x := e]] = {(ω, ν) : ν = ω except ν[[x]] = ω[[e]]} [[?Q]] = {(ω, ω) : ω |= Q} [[if(Q) α else β]] = {(ω, ν) : (ω |= Q and (ω, ν) ∈ [[α]]) or (ω 6 |= Q and (ω, ν) ∈ [[β]])} [[α; β]] = {(ω, ν) : (ω, μ) ∈ [[α]], (μ, ν) ∈ [[β]]} [[α∗]] = {(ω, ν) : there are n∈N, μ 0 =ω, μ 1 , μ 2 ,... , μn=ν such that (μi, μi+1) ∈ [[α]] for all 0≤i<n
[[while(Q) α]] =
(ω, ν) : μ 0 =ω, μ 1 , μ 2 ,... , μn=ν and μi |= Q, (μi, μi+1) ∈ [[α]] and μn 6 |= Q for all 0≤i<n
5: Dynamic Logic axioms 〈·〉 〈α〉P ↔ ¬[α]¬P [:=] [x := e]p(x) ↔ p(e) [?] [?Q]P ↔ (Q → P ) [if] [if(Q) α else β]P ↔ (Q → [α]P ) ∧ (¬Q → [β]P ) [;] [α; β]P ↔ [α][β]P
[unwind] [while(Q) α]P ↔ [if(Q) {α; while(Q) α}]P
K [α](P → Q) → ([α]P → [α]Q) I [α∗]P ↔ P ∧ [α∗](P → [α]P )
C [α∗]∀n>0 (ϕ(n) → 〈α〉ϕ(n − 1)) → ∀n≥0 (ϕ(n) → 〈α∗〉ϕ(0)) (n^6 ∈^ α) V p → [α]p (FV(p) ∩ BV(α) = ∅) Det 〈α〉P → [α]P (α is deterministic)
6: First-order axioms ∀i (∀x p(x)) → p(e) (arbitrary term e)
∀→ ∀x (P → Q) → (∀x P → ∀x Q)
V∀ p → ∀x p (x 6 ∈ FV(p))
7: Dynamic Logic sequent calculus proof rules
loop Γ J, ∆ J [α]J J P Γ [α∗]P, ∆
while Γ J, ∆ J, Q [α]J J, ¬Q P Γ [while(Q) α]P, ∆ con Γ ∃n≥ 0 ϕ(n), ∆ ϕ(n), n> 0 〈α〉ϕ(n − 1) ϕ(0) P Γ 〈α∗〉P, ∆ (n new)
var Γ J, ∆ J, Q, ϕ = n 〈α〉(J ∧ ϕ < n) J, Q ϕ ≥ 0 J, ¬Q P Γ ` 〈while(Q) α〉P, ∆ (n new)
M[·] R
Γ [α]Q, ∆ Q P Γ [α]P, ∆ M[·] L Γ, [α]Q ∆ P Q Γ, [α]P ∆ G
Γ ` [α]P, ∆
Γ 〈α〉Q, ∆ Q P Γ 〈α〉P, ∆ M〈·〉 L Γ, 〈α〉Q ∆ P Q Γ, 〈α〉P ∆