Download Chapter 2: Analysis and Verification of Non-Real

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Chapter 2: Analysis and Verification
of Non-Real-Time Systems
Albert M. K. Cheng
Specification, Analysis, and
Verification of Untimed Systems



Many approaches for proving correctness are
based on symbolic logic and/or languages and
automata
Performance is often studied via mathematical
modeling, simulation, and runtime measurements
Analysis and verification techniques for real-time
systems are often based on or extensions of their
untimed counterparts
Symbolic Logic


Propositional logic (zero-order logic): write
declarative sentences called proposition that can
be either true (T) or false (F). Example use:
specifying and verifying digital logic circuits
Predicate logic (first-order logic): allows the use
of quantifiers to indicate for which values the
specified sentence is true. Example use:
specifying and verifying computer programs
Propositional Logic

Example: P “sensor detects intruder”
Q “alarm sounds”
R “police is alerted”
We can state P -> Q and Q -> R
We can show that P -> R
Resolution Principle for
Propositional Logic

For any two clauses C_1 and C_2, if there
is a literal L_1 in C_1 and there is a literal
L_2 in C_2 such that “L_1 and L_2” is
false, then the resolvent of C_1 and C_2 is
the disjunction of the remaining clauses in
C_1 and C_2 after removing L_1 and L_2
from C_1 and C_2, respectively.
Resolution Principle - Example

P or Q
~Q or R or ~S
resolvent is P or R or ~S
Verification using Automata
Given:
 Implementation automaton A_I
 Specification automaton A_S
Verify:
 A_I satisfies A_S by showing that the
language accepted by A_I is a subset of the
language accepted by A_S, that is,
L(A_I) is subset of L(A_S)
Predicate Logic








Function, terms, predicates
Atoms, bound and free variables
Interpretation
Closed formula
Satisfiable formula
Valid formula
Prenex normal form
Skolem standard form
Proving Unsatisfiability of a Clause Set using
the Resolution Procedure




Substitution, variant
Unification, unifier
Resolvent
Resolution theorem
Languages and their Representations



Regular expressions
Deterministic finite automaton (DFA)
Nondeterministic finite automaton (NFA)
Example 1: Untimed automaton
representing climate control unit
S_4
turn_on_heater
S_5
comfort
S_1
cold
hot
S_0
turn_off_heater
turn_off_ac
S_6
turn_on_ac
S_2
S_3
comfort
Untimed Process

Pair (E,S), where E is the event set and S is
the set of possible traces
Example: Traffic light
event set = {green, yellow, red}
trace =
{green}{yellow}{red}{green}{yellow}
{red}…
Untimed Trace

Linear sequence of observable events of a
process:
p bar = p_1 p_2 p_3 …
infinite word over nonempty subsets of
event set
Related documents