Docsity

Temporal Logics - Computer Aided Verification - Slides | CIS 6930, Study notes of Computer Science

Partial preview of the text

Download Temporal Logics - Computer Aided Verification - Slides | CIS 6930 and more Study notes Computer Science in PDF only on Docsity!

CIS 6930/4930 Computer Aided Verification

Temporal Logics Hao Zheng Dept. of Computer Science & Eng. Univ. of South Florida

Temporal Logics

  • A formalism to describes properties of paths in the model

of reactive systems.

  • First order logic augmented with temporal operators.
  • Time is implicit.
    • Explicit in real-time temporal logics.
  • There exist different temporal logics.
    • With different view of underlying computation.
  • CTL* (CTL) views computation of a system as a tree.
    • System can move into different future.
  • LTL views computation of a system as a set of paths.
    • System has only one direction into the future.
  • To describe paths from a given state.
  • Path quantifiers:
    • A : for all computation paths from a state.
    • (^) E : for some computation path(s) from a state.
  • Linear temporal operators: describe properties along a

path.

  • G p ─ p holds in every state on the path.
  • (^) F p ─ p holds in some state on the path.
  • X p ─ p holds in the second state of the path
  • p U q ─ p holds until q holds in some state on the path.
  • (^) p W q − similar to U , but q does not need to hold. Computational Tree Logic CTL*

State and Path Formulas

  • Path formulas hold along a path.
    • If f is a state formula, it is also a path formula.
    • If f and g are path formulas, so are boolean combinations of f and g , X f , F f , G f , and f U g.
  • State formulas hold at a state.
    • If p is an atomic proposition, then p is a state formula.
    • If f and g are state formulas, so are boolean combinations of f and g.
    • (^) If f is a path formula, A f and E f are state formulas.
  • CTL* formuals are state formulas generated by the above

rules.

Semantics: State Formulas

  • Defined w.r.t a Kripke structure^ M.
  • If f is a state formula, M, s╞ f means f holds at state s of M.
  • Definitions:
    • (^) M, s╞ p ↔ if p is an atomic proposition and p ∈ L ( s ).
    • (^) M, s╞ ¬ f ↔ M, s╞ f does not hold.
    • (^) M, s╞ f ∨ g ↔ M, s╞ f or M, s╞ f.
    • (^) M, s╞ f ∧ g ↔ M, s╞ f and M, s╞ f.
    • M, s╞ A f ↔ f is a path formulas, and for all paths π from s such that M, π╞ f.
    • M, s╞ E f ↔ f is a path formula, and there is a path π from s such that M, π╞ f.

Equivalences

  • Not all operators are essential to express a property.
    • (^) f ∧ g ≡ ¬(¬ f ∨ ¬ g )
    • (^) A f ≡ ¬ E (¬f )
    • (^) G f ≡ ¬ F (¬f)
    • F f ≡ ( true U f )
    • (^) F ( f ∨ g ) ≡ F f ∨ F g
      • (^) What about F ( f ∧ g ) ≡ F f ∧ F g?
    • (^) G ( f ∧ g ) ≡ G f ∧ G g
      • (^) What about G ( f ∨ g ) ≡ G f ∨ G g.
    • (^) f U g ≡ ¬(¬ g U (¬ f ∧ ¬ g )) ∧ F g

Interpretation of CTL Operators AG f is true EG f is true

Interpretation of CTL Operators AF f is true (^) EF f is true

Interpretation of CTL Operators A ( f U g ) is true (^) E ( f U g ) is true

A Sufficient Set of CTL Operators

  • (^) Any CTL formulas can be expressed using EX , EG , and EU.
    • (^) AX f = ¬ EX ¬ f
    • (^) AG f = ¬ EF ¬ f = ¬ E ( true U ¬ f )
    • (^) AF f = ¬ EG ¬ f
    • (^) A ( f U g ) = (¬ EG ¬ g ) ∧ (¬ E (¬ g U (¬ f ∧ ¬ g ))?
  • What does AG ( AF f ) mean?

A Sufficient Set of LTL Operators

  • (^) { U, X}, {R, X}, or {W, X} is sufficient.
    • (^) G f ≡ ¬ F ¬ f
    • (^) ¬ X f ≡ X ¬ f
    • (^) f R g ≡ ¬(¬ f U ¬ g )
    • (^) f U g ≡ f W g ∧ F g
    • (^) F f ≡ true U f
  • Examples: GF f and FG f?

CTL, CTL, and LTL*

CTL*

CTL LTL

  • (^) CTL formula specifies a set of states.
  • (^) A LTL formula specifies a set of paths.
  • (^) AFG f is not expressible in CTL.
  • (^) AG(EF f ) is not expressible in LTL.

Fairness

  • Fairness means certain properties happen infinitely often

during compuation.

  • An arbiter cannot ignore some requests forever.
  • A communication channel cannot lose message all the time.
  • Models may contain unfair computations.
  • Non-deterministic models of physical computating systems.
  • Wrong implementations of fairness requirements.
  • Fairness constraints eliminate the unfair computations.
  • Unfairness introduced to simplify modeling.
  • Fair computations satisfy fairness constraints infinitely

often.

Fair Semantics

  • Fairness constraints are expressed as sets of states that hold

infinitely often on computations.

  • CTL* semantics with fairness
    • M, s╞F p^ ↔^ if there is a fair path from^ s^ and^ p^ ∈^ L ( s ).
    • M, s╞F A^ f^ ↔ f^ is a path formulas, and for^ all^ fair^ paths^ π^ from^ s^ such that M, π╞ f.
    • M, s╞F E^ f^ ↔ f^ is a path formula, and there is^ a^ fair^ path^ π^ from^ s^ such that M, π╞ f.
  • CTL – will discuss it later.
  • LTL – fairness can be easily expressed and incorporated

with verification.

  • (^) Ex.: GF p , or GF p → GF q