SS 2017 Software Verification Automated Verification

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

UML Statechart semantics Speaker: Fei Mo Tutor: Priv.-Doz. Dr. Thomas Noll Lehrstuhl für Informatik 2 RWTH Aachen SS 07.
UML State chart/machine diagram State machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state.
Software Verification 1 Deductive Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität und Fraunhofer Institut.
Vered Gafni – Formal Development of Real Time Systems 1 Statecharts Semantics.
CS6133 Software Specification and Verification
UPPAAL Introduction Chien-Liang Chen.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Timed Automata.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
Modeling Software Systems Lecture 2 Book: Chapter 4.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
CS6133 Software Specification and Verification
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Software Verification 1 Deductive Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität und Fraunhofer Institut.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
6/12/20161 a.a.2015/2016 Prof. Anna Labella Formal Methods in software development.
Model Checking Lecture 2. Model-Checking Problem I |= S System modelSystem property.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5.
Model Checking Lecture 2 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
7/7/20161 Formal Methods in software development a.a.2015/2016 Prof.Anna Labella.
SS 2017 Software Verification Timed Automata
Formal methods: Lecture
State Machine Diagrams
Marlon Dumas Institute of Computer Science
SS 2017 Software Verification Bounded Model Checking, Outlook
Finite State Machines Dr K R Bond 2009
SS 2017 Software Verification Probabilistic modelling – DTMC / MDP
Prof. Dr. Holger Schlingloff 1,2 Dr. Esteban Pavese 1
Prof. Dr. Holger Schlingloff 1,2 Dr. Esteban Pavese 1
Software Verification 2 Automated Verification
SS 2017 Software Verification LTL monitoring
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
SS 2017 Software Verification Software Model Checking 2 - Parallelism
Finite Automata a b A simplest computational model
State Machine Diagrams
SS 2018 Software Verification FOL to ML
Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami.
SS 2018 Software Verification LTL Satisfiability applied
SS 2018 Software Verification ML, state machines
SS 2017 Software Verification CTL model checking, BDDs
SS 2017 Software Verification Tableaus, CTL model checking
Software Verification 2 Automated Verification
SS 2018 Software Verification SAT & FOL
SS 2018 Software Verification Strategic Reasoning
Alternating tree Automata and Parity games
Software Verification 2 Automated Verification
SS 2017 Software Verification Modal Logics
Formal Methods in software development
Software Verification 2 Automated Verification
Formal Methods in software development
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Marlon Dumas Institute of Computer Science
Formal Methods in software development
Formal Methods in software development
Formal Methods in software development
Presentation transcript:

SS 2017 Software Verification Automated Verification Prof. Dr. Holger Schlingloff 1,2 Dr. Esteban Pavese 1 (1) Institut für Informatik der Humboldt Universität (2) Fraunhofer Institut für offene Kommunikationssysteme FOKUS

A Note about Laptop Usage From: Carrie B. Fried, In-class laptop use and its effects on student learning; Elsevier Journal on Computers and Education, 2007: This research raises serious concerns about the use of laptops in the classroom. ... The use of laptops was negatively related to several measures of learning. The pattern of the correlations suggests that laptop use interfered with students’ abilities to pay attention to and understand the lecture material, which in turn resulted in lower test scores. The results of the regression analysis clearly show that success in the class was negatively related to the level of laptop use. Ultimately ... these results clearly demonstrate that the use of laptops can have serious negative consequences. ... Laptop use is negatively associated with student learning and it poses a distraction to fellow students.

Some Questions for Recap What are problems with material implication? Difference between (pq) and (p□q)? Explain the formula (□pp)! Syntax and semantics of modal logic? Which statements are valid (in K): ˫ (p□p) p ˫ □p Relation between ML, PL, FOL? ˫ (pp) p ˫ p ˫ (□pp) □p ˫ p

Finite State Machines  

FSM: Semantics Trace semantics: Consider a (finite or infinite) sequence σ=(s0,a1,s1,a2,s2, ...). We say that σ is generated by the FSM M, or σ is a trace of M, iff s0 is the initial state of M, and for all i, (si,ai+1,si+1)R A trace is maximal if it is infinite, or finite with last state sn, and there is no a and s such that (sn,a,s)R Tree semantics: The set of all finite traces of M can be seen as the nodes of a (finite or infinite) tree T(M): The root of T(M) is (s0) The children of (s0,a1, ..., sn) are all traces (s0,a1, ..., sn,an+1,sn+1) Maximal traces are either leafs or infinite branches

FSM and ML Essentially, an FSM is a Kripke strukture where edges are labelled with an action. Can we describe FSMs in ML? Add action labels to modalities: Multi-modal logic Syntax: MML ::= Ρ |  | (MML  MML) | A MML As usual, [a] φ = a φ Semantics: Let M be an FSM and sS (M,s) ||- aφ iff s´S s.t. (s,a,s´) R and (M,s´) ||- φ M ||- φ iff (M,s0) ||- φ

Some exercises on MML M ||- (START   RED) ? M ||- (RED  □ RED) ? M ||- □ ( RED  BLUE  GHOST) ? M ||- (BLUE  collision GHOST) ? M ||- (BLUE  [collision] GHOST) ? M ||- (BLUE  [collision]   update update BLUE) ?

FSM: Variants Labelled transition system LTS Finite transition system / Finite graph Kripke structure / Kripke model Nondeterministic finite automaton NFA Deterministic finite automaton DFA Finite-state program

Parallel FSMs Consider M1=S1, s1,0, A1, P1,R1,V1 and M2=S2, s2,0, A2, P2,R2,V2, where P1P2=. Define M=M1 || M2 by S=S1S2 s0= s1,0, s2,0 A= A1 A2 P= P1 P2 V(p)={s1,s2 | pP1 and s1V1(p) or pP2 and s2 V2(p)} s1,s2, a, s‘1,s‘2R iff a A1\ A2 , s1, a, s‘1R1 , and s2=s‘2, or a A2\ A1 , s2, a, s‘2R2 , and s1=s‘1, or a A1  A2 , s1, a, s‘1R1 , and s2, a, s‘2R2 Intuitively, M1 and M2 “synchronize on shared actions“

An embedded-systems example A video camcorder owner's manual almost incomprehensible can be found in the internet typical for such devices Multifunctional on-off switch: up: off down: cycles through "tape", "memory" and "play/edit" mode Intuitively, tape mode is for video, memory mode for pictures and play mode for viewing recorded material

FSM for VCR Switch How can we formally describe the behaviour of this switch? (Natural language description is ambivalent: What does "cycle" mean? What if I push dn-dn-up-dn?) Modelling by finite state machine: States: {off, tape, memory, play} Transition relations: {up, dn} off memory tape play dn up

Parallel FSM for VCR Switch Our FSM models the behaviour of the camera in reaction to the signals it receives from the switch Must be put in parallel with model of switch Every model abstracts from details (e.g., there is a little green button within the switch which arrests it in the "off" position) switch camera off memory tape play dn up but_hi dn up but_lo dn

Hierarchical Parallel FSM Structuring the model can be done by grouping all operating modes in one “on”-state An “up”-transition brings the camera to state “off” from all sub-states of “on” Additionally modelled here: Power failure but_hi but_lo dn up off on dn, pwr_res up, pwr_fail memory tape play switch camera

Extended FSMs Allow variables on arbitrary finite domains in states V = (x1, ..., xn), D =(D1,...,Dn) Valuation V: S  V  D Propositional variables can be seen as special case (D={true, false}) Allow transitions to update variables s,a/x:=t,s’R implies that V(s’,x) = I(t) Allow transitions to depend on variables let φ be a (propositional) formula s,a[φ],s’R implies that s ||- φ Build equivalence classes of states a mode is a set of states only differing in the valuation of one or more variables usually, a bubble in a graph represents a mode, not a state

What is a „State“ Wikipedia: State (computer science), a unique configuration of information in a program or machine Program state, in computer science, a snapshot of the measure of various conditions in the system a program is described as stateful if it is designed to remember preceding events or user interactions; the remembered information is called the state of the system Propositional viewpoint: A state is a complete description of the current value of variable properties of a system properties might be physical measurables such as weight, temperature, shape, … or they might be the current value of the bits in memory (variable value assignment) properties may change over time (thus they are variable) properties may be observable or unobservable / only indirectly observable

UML State Machines – States UML states are really modes (sets of states) A UML state models a situation during which (usually implicit) invariant conditions hold e.g. waiting for an event to occur e.g. performing some behavior Associated with each state may be entry, do and exit actions constraints (=state invariants) Pseudostates initial, history, fork, join, junction, choice, entry, exit, terminate, (final)

UML State Machines – Transitions A transition is a directed relationship between a source vertex and a target vertex Labels consist of Trigger [Guard] / Action where trigger is a transition label (i/o-event) guard is a logical formula on internal variables action is an update of the variables “Run-to-completion” semantics if an action is also a trigger, it will be processed before the next external trigger is taken into consideration maintaining an “event pool” during execution

State Machine Meta Model