Brendan Ang

Search

Search IconIcon to open search

Model Checking

Last updated Apr 11, 2023 Edit Source

# Model Checking

Inputs:

# Transition Systems and Kripke Structures

Transition systems describe the states, initial states and the possible state transition for the system.

Formally: $T=(Q,I,E,\delta)$

# Kripke Structures

A Kripke structure extends a transition system with the idea of propositions in states.

Formally: $K=(Q,I,E,\delta,\lambda)$

# Checking Invariants

Invariants are safety properties.

Formally: a system invariant is a property $P$ such that $q\models P$, for all reachable states $q$.

# Enumeration Algorithm

A simple Breadth First Search or Depth First Search algorithm to enumerate all possible states and check for an invariant violation. The search space is large. A few techniques can be employed:

# Temporal Logic

The properties/invariants we need to check are for example:

# Linear Temporal Logic

We can express these by combining Propositional Logic and temporal operators: Operators are defined on paths/traces of execution: They can also be nested: 300 FG p: there exists a trace where eventually, p holds forever. Only the first trace can be proven to be true since we do not know the states of p for the 2nd trace.

# Computation Tree Logic

Apply temporal logic not just on a single path but on many different possible branches which is needed for transition systems. Operators cannot be nested

# Tools

A core tool used for model checking is NuSMV

# Binary Decision Diagrams

Data structure which efficiently reduces redundancy in sub-expressions of Boolean functions.

The basic state space search algorithm with set theory: This is useful in model checking as we can represent $R$ and $I$ as boolean function of {0,1} as being part of the set or not. We can then use BDD operations rather than set operations.

# Example BDD derivation

# Reduction Algorithm