An Introduction to the Model Verifier verds Wenhui Zhang September 15 th, 2010.

Slides:



Advertisements
Similar presentations
1 Verification of Parameterized Systems Reducing Model Checking of the Few to the One. E. Allen Emerson, Richard J. Trefler and Thomas Wahl Junaid Surve.
Advertisements

Metodi formali dello sviluppo software a.a.2013/2014 Prof.Anna Labella.
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
M ODEL CHECKING -Vasvi Kakkad University of Sydney.
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
并发模型的验证 ( 例子 ). 2 互斥协议模型:示意图 x==0||t==0 t0 x=1,t=0 t1 t2 y==0||t==1 t3 x=0 s0 y=1,t=1 s1 s2 s3 y=0 初始状态 s0 t0 x=0 y=0 t=0.
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
Planning based on Model Checking Dept. of Information Systems and Applied CS Bamberg University Seminar Paper Svetlana Balinova.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
François Fages MPRI Bio-info 2006 Formal Biology of the Cell Modeling, Computing and Reasoning with Constraints François Fages, Constraints Group, INRIA.
Temporal Logic and the NuSMV Model Checker CS 680 Formal Methods Jeremy Johnson.
Model Checking I What are LTL and CTL?. and or dreq q0 dack q0bar.
UPPAAL Introduction Chien-Liang Chen.
Model Checking Inputs: A design (in some HDL) and a property (in some temporal logic) Outputs: Decision about whether or not the property always holds.
SYMBOLIC MODEL CHECKING: STATES AND BEYOND J.R. Burch E.M. Clarke K.L. McMillan D. L. Dill L. J. Hwang Presented by Rehana Begam.
CS 267: Automated Verification Lecture 7: SMV Symbolic Model Checker, Partitioned Transition Systems, Counter-example Generation in Symbolic Model Checking.
Review of topics Final exam : -May 2nd to May 7 th - Projects due on May 7th.
SAT and Model Checking. Bounded Model Checking (BMC) A.I. Planning problems: can we reach a desired state in k steps? Verification of safety properties:
About ACTL-W and the implementation of a BDD based model checker ISTI, Pisa Robert Meolic Faculty of EE&CS, Maribor, Slovenia Friday, Februar 13, 2004.
Application of TBDs Technical development Ordered TBDs Operations on ordered TBDs ( , ,  ) Reduced ordered TBDs Model checking == Manipulation of TBDs.
Lecture 4&5: Model Checking: A quick introduction Professor Aditya Ghose Director, Decision Systems Lab School of IT and Computer Science University of.
Sanjit A. Seshia and Randal E. Bryant Computer Science Department
1 CTL Model Checking David L. Dill. 2 CTL syntax: AP -- atomic propositions p  AP is a formula f  g is a formula, if f and g are ¬f is a formula AX.
Review of the automata-theoretic approach to model-checking.
Embedded Systems Laboratory Department of Computer and Information Science Linköping University Sweden Formal Verification and Model Checking Traian Pop.
ESE601: Hybrid Systems Introduction to verification Spring 2006.
Witness and Counterexample Li Tan Oct. 15, 2002.
CS 267: Automated Verification Lecture 13: Bounded Model Checking Instructor: Tevfik Bultan.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Verification technique on SA applications using Incremental Model Checking 컴퓨터학과 신영주.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
1 Introduction to SMV and Model Checking Mostly by: Ken McMillan Cadence Berkeley Labs Small parts by: Brandon Eames ISIS/Vanderbilt.
Model Checking Lecture 4 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used.
10/19/2015COSC , Lecture 171 Real-Time Systems, COSC , Lecture 17 Stefan Andrei.
CS6133 Software Specification and Verification
CTL Model Checking 张文辉
Lecture 81 Optimizing CTL Model checking + Model checking TCTL CS 5270 Lecture 9.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Learning Symbolic Interfaces of Software Components Zvonimir Rakamarić.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Validation - Formal verification -
Verification & Validation By: Amir Masoud Gharehbaghi
1 CSEP590 – Model Checking and Automated Verification Lecture outline for July 9, 2003.
Model Checking Lecture 1. Model checking, narrowly interpreted: Decision procedures for checking if a given Kripke structure is a model for a given formula.
Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology.
Bounded Model Checking A. Biere, A. Cimatti, E. Clarke, Y. Zhu, Symbolic Model Checking without BDDs, TACAS’99 Presented by Daniel Choi Provable Software.
6/12/20161 a.a.2015/2016 Prof. Anna Labella Formal Methods in software development.
29/06/2016Verification Synchronous Languages Verification.
Counterexample-Guided Abstraction Refinement By Edmund Clarke, Orna Grumberg, Somesh Jha, Yuan Lu, and Helmut Veith Presented by Yunho Kim Provable Software.
Complexity of Compositional Model Checking of Computation Tree Logic on Simple Structures Krishnendu Chatterjee Pallab Dasgupta P.P. Chakrabarti IWDC 2004,
Basic concepts of Model Checking
Symbolic model checking with SAT/SMT
Formal methods: Lecture
What is the SMV (Symbolic Model Verifier) System ?
CTL model checking algorithms
CIS 842: Specification and Verification of Reactive Systems
SS 2017 Software Verification CTL model checking, BDDs
Over-Approximating Boolean Programs with Unbounded Thread Creation
Automatic Verification of Industrial Designs
Chapter 4: Model Checking of Finite State Systems
Albert M. K. Cheng Real-Time Systems Laboratory University of Houston
CSCI1600: Embedded and Real Time Software
Computer Security: Art and Science, 2nd Edition
Model Checking Concurrent Systems – An Example: Mutual Exclusion
Introduction to verification
Program correctness Model-checking CTL
Presentation transcript:

An Introduction to the Model Verifier verds Wenhui Zhang September 15 th, 2010

Contents (1) On boolean diagram model checking (2) On bounded semantics model checking (3) On the model verifier verds

Boolean Diagram Model Checking A kind of symbolic model checking. – Based on boolean diagrams for boolean function manipulation. – Different from the usual symbolic model checking based on decision diagrams. Initial experimental evaluation based on random boolean programs shows that it has significant advantages over symbolic model checking based on decision diagrams.

Bounded Semantics Model Checking A kind of bounded model checking. – Based on bounded semantics that can be used for both bounded verification and bounded error detection. – Different from the usual bounded model checking based on bounded semantics of existential temporal logics. Initial experimental evaluation shows that it has advantages over symbolic model checking in a large percentage of the test cases, where both verification and error detection problems are well represented.

verds: a Model Verifier Type of Systems: – Just discrete systems (fair Kripke structures) implmented by a set of concurrent processes Type of Properties: – Computation Tree Logic (CTL) Verification Techniques: – Boolean diagram model checking – Bounded semantics model checking (without fairness)

Contents (1)On boolean diagram model checking (a) Boolean diagrams (in particular, TBDs) (b) A connection of TBDs to model checking (2) On bounded semantics model checking (3) On the model verifier verds

Boolean diagrams BD = Labeling function Root Edges Nodes

BD = : Nodes (N)

k-ary BD: Ordered Edges (E: N -> N k ) Note: E is a partial function Note: k=3 is used in the following application

TBD: Root Node (n 0  N)

A B - C B A D - D - A - D TBD: Labels (L: N -> L  - L ) L ={A,…,D}, - L ={-A,…,-D}

Language: Subset of ( L  - L )* Language: Accepted Strings of Labels A string is accepted by a TBD, if the TBD can be simplified to a positive terminal node, according to given simplification rules.

A B - C B A D - D - A - D Simplification on a Pos./Neg. Label Select all nodes with the same label (regardless of the sign) Select among the nodes in which all successors of the node are terminals Replace the selected nodes with a simpler one according to given rules

u ~y~y - z ~x~x ~y~y z ~x~x - u u - z ~x~x ~y~y Simplification for a Positive Node

- u ~y~y - z ~x~x ~y~y z ~x~x - u u z - ~ x z - ~ y Simplification for a Negative Node

A B - C B A D - D - A - D Two Examples: No Accepted Strings - A

A B - C B A D - D - A - D Example: An Accepted String - D BA - C - A A

A B - C B - A - D - A - D Example: An Accepted String - D BA - C - A A

A B D B - C - A - D Example: An Accepted String - D BA - C - A A

A B D B - C - A - D Example: An Accepted String - D BA - C - A A

A B D - D Example: An Accepted String - D BA - C - A A

Example: An Accepted String - D BA - C - A A A B D - D

B Example: An Accepted String - D BA - C - A A

BCA Models: Subsets of L D m: Subset Exists an accepted string s such that x in s implies (x>0 and x in m) or (x<0 and –x not in m)

A B - C B A D - D - A - D Example: A Model A- C - B A { A } is a model.

Concepts Related to Models A TBD is complete, if every subset of the positive labels is a model. Two TBDs are equivalent, if they have the same set of models.

BCA Boolean Formulas as TBDs D V: Subset Consider a boolean formula φ with variables in V m is a model of φ iff φ evaluates to true under the assignment such that …….

BCA Boolean Formulas as TBDs D V: Subset φ is equivalent to a TBD t iff φ and t have the same set of models

Some Properties A boolean formula is valid iff its corresponding TBD is complete. Two boolean formulas are equivalent iff their corresponding TBDs are equivalent.

Boolean Diagram Model Checking Technical development Ordered TBDs Operations on ordered TBDs Reduced ordered TBDs Model checking == Manipulation of TBDs Technical Details

Technical Reports Wenhui Zhang. Ternary Boolean Diagrams. Technical Report ISCAS-LCS-10-15, Institute of Software, Chinese Academy of Sciences

Contents (1) On boolean diagram model checking (2) On bounded semantics model checking (a)Kripke structure (b)Semantics of CTL (c) Bounded semantics of CTL (d) A connection to model checking (3) On the model verifier verds

Kripke Structure KS = Labeling function Initial States Transition Relation States

KS= : States (S)

KS: Transition Relation (R  SxS) Note: R is a total relation

KS: Initial States (I  S)

p p,r q,r p,q p,rr q p,q,r q,r KS: Labels (L: S->2 AP )

Computation/Paths {p}{p,q}

CTL Formulas AX φ AF φ A( φ U Ψ ) AG φ A( φ R Ψ ) EX φ EF φ E( φ U Ψ ) EG φ E( φ R Ψ )

Semantics: M,s |= A  or M,s |= E  X φ F φ Ψ U φ G φ Ψ R φ Ψ Ψ Ψ φ φ φ φφφφ φ φ φ φφφ φφφ φ φ φ Ψ s

Bounded Semantics (k=4) X φ F φ Ψ U φ G φ Ψ R φ Ψ Ψ Ψ φ φ φ φφφφ φ φ φ φφφ φφφφ Ψ s

Bounded Semantics (k=4) X φ F φ Ψ U φ G φ Ψ R φ Ψ Ψ Ψ φ φ φ φφφφ φ φ φ φφφ φφφφ Ψ s internal loop

Soundness and Completeness M,s |=  iff there is a bounded model M k such that M k,s |= 

BS Model Checking Principle M,s |=  : s0: k=0; s1: M k,s|=  holds, report that  holds; s2: M k,s|=  holds, report that  does not hold; s3: increase k; goto s1.

BS Model Checking Algorithm Formulate BS of CTL with QBF-formulas Model checking CTL == Solving QBF-formulas Formal Definitions and Technical Details

Technical Reports/Papers Wenhui Zhang. Bounded Semantics of CTL. Technical Report ISCAS-LCS-10-16, Institute of Software, Chinese Academy of Sciences Wenhui Zhang. Bounded Semantics of CTL and SAT-based Verification. ICFEM 2009:

Contents (1) On boolean diagram model checking (2) On bounded semantics model checking (3) On the model verifier verds (a) Introduction to the tool “verds” (b) Experimental evaluations

Structure of verds

Boolean diagram model checking : efficient with respect to a set of test cases, except a few of them, in comparison with NuSMV 2.5.0; Remarks: The test cases are combinations of: 2 types of random boolean programs, and a set of 24 CTL formulas. Strength of verds (1)

Bounded semantics model checking: efficient in over half of the same test cases, in comparison with boolean diagram model checking with “verds”. Remarks: The efficiency depends very much on the QBF-solving techniques: external QBF-solvers may be used to increase the efficiency. For ACTL formulas, the use of SAT-solving techniques may be more efficient. Strength of verds (2)

Modeling and Specification Models: Just discrete systems Properties: CTL properties

Just Discrete Systems D = V : A finite set of typed system variables, such that the domain of each variable must be finite. Θ : An assertion characterizing the initial states. ρ : An assertion ρ(V,V') relating the variables in V to the variables in V' of a successor state. J : A set of justice requirements (weak fairness).

Specification Language: CTL AX φ AF φ A( φ U Ψ ) AG φ A( φ R Ψ ) EX φ EF φ E( φ U Ψ ) EG φ E( φ R Ψ ) A proposition is written as “e1 op e2” where e1,e2 are expressions and op is an operator comparing the values of the expressions.

An Example: Mutual Exclusion

Mutual Exclusion (Part 1) VVM me005 VAR x[0..1]: 0..1; t: 0..1; INIT x[0]=0; x[1]=0; t=0; PROC p0: p0m(x[],t,0); p1: p0m(x[],t,1); SPEC AG(!(p0.a=s2&p1.a=s2)); AG((!p0.a=s1|AF(p0.a=s2|p1.a=s2))& (!p1.a=s1|AF(p0.a=s2|p1.a=s2))); AG((!p0.a=s1|AF(p0.a=s2))&(!p1.a=s1|AF(p1.a=s2))); AG((!p0.a=s1|EF(p0.a=s2))&(!p1.a=s1|EF(p1.a=s2)));

Mutual Exclusion (Part 2) MODULE p0m(x[],t,i) VAR a: {s0,s1,s2,s3}; INIT a=s0; TRANS a=s0: (x[1-i],t,a):=(1,1-i,s1); a=s1&(x[i]=0|t=i): (a):=(s2); a=s1&!(x[i]=0|t=i): (a):=(s1); a=s2: (x[1-i],a):=(0,s3); a=s2: (a):=(s2); a=s3: (x[1-i],t,a):=(1,1-i,s1); FAIRNESS running;

BD Model Checking

verds -ck 1 me005.vvm VERSION: verds AUG 2010 FILE: me005.vvm PROPERTY: AG!((a=2)&(b=2)) CONCLUSION: TRUE (time=0)

BD Model Checking verds -ck 2 me005.vvm VERSION: verds AUG 2010 FILE: me005.vvm PROPERTY: AG((!(p0.a=1)|AF((p0.a=2)|(p1.a=2)))&…… CONCLUSION: TRUE (time=0)

BD Model Checking verds -ck 3 me005.vvm VERSION: verds AUG 2010 FILE: me005.vvm PROPERTY: AG((!(p0.a=1)|AF(p0.a=2))& (!(p1.a=1)|AF(p1.a=2))) CONCLUSION: FALSE (time=0) Remark: Needs an additional fairness constraint: a!=s2 for the 2 processes

BD Model Checking verds -ck 4 me005.vvm VERSION: verds AUG 2010 FILE: me005.vvm PROPERTY: AG((!(p0.a=1)|EF(p0.a=2))&(!(p1.a=1)|EF(p1.a=2))) CONCLUSION: TRUE (time=0)

BS Model Checking (without fairness)

verds -bs -ck 1 me004.vvm VERSION: verds AUG 2010 FILE: me004.vvm PROPERTY: AG!((a=2)&(b=2)) WARNING: no solvers are specified WARNING: an internal solver is used bound = 0 time = time = 0 bound = 1 time = 0. bound = 10 time = 1 CONCLUSION:TRUE (time=1 bound=10)

BS Model Checking (without fairness) verds -bs -ck 2 me004.vvm VERSION: verds AUG 2010 FILE: me004.vvm PROPERTY: AG((!(p0.a=1)|AF((p0.a=2)|(p1.a=2)))&…… WARNING: no solvers are specified WARNING: an internal solver is used bound = 0 time = time = 0 bound = 1 time = time = 0 bound = 2 time = time = 0 CONCLUSION: FALSE (time=0 bound=2)

BS Model Checking (without fairness) verds -bs -ck 3 me004.vvm VERSION: verds AUG 2010 FILE: me004.vvm PROPERTY: AG((!(p0.a=1)|AF(p0.a=2))& (!(p1.a=1)|AF(p1.a=2))) WARNING: no solvers are specified WARNING: an internal solver is used bound = 0 time = time = 0 bound = 1 time = time = 0 bound = 2 time = time = 0 CONCLUSION: FALSE (time=0 bound=2)

BS Model Checking (without fairness) verds -bs -ck 4 me004.vvm VERSION: verds AUG 2010 FILE: me004.vvm PROPERTY: AG((!(p0.a=1)|EF(p0.a=2))&(!(p1.a=1)|EF(p1.a=2))) WARNING: no solvers are specified WARNING: an internal solver is used bound = 0 time = time = 0 bound = 1 time = 0. bound = 10 time = 394 CONCLUSION: TRUE (time=394 bound=10)

Experimental Evaluations Test Cases: Random Programs with Concurrent Processes Random Programs with Concurrent Sequential Processes 24 CTL properties Experimental Details

Summary of the Evaluations With respect to the experimental data: Boolean diagram model checking has clear advantages over BDD-based symbolic model checking with NuSMV. Bounded semantics model checking and boolean diagram model checking have their own advantages.

Documentation

Concluding Remarks Boolean diagram model checking, bounded semantics model checking, and the model verifier “verds” with its modeling language and specification language have been presented. Two distinguished features of “verds” are that it supports boolean diagram model checking based on TBDs and bounded semantics model checking based on QBF.

Future Works Future works include: various practical improvements to the model verifier, and theoretical works on TBDs and bounded semantics.

Model Checking: – Implementation of cone of influence reduction – Implementation of partitioned transition relation – Implementation of counter-example generation – Improvement of the relational product computation QBF/SAT: – Improvement of the encoding of problems – Improvement of the QBF/SAT-solving algorithms Some Practical Issues

On TBDs: – Succinctness of representation of a formula; – Complexity of the operation “conjunction”; On Bounded Semantics Model Checking: – Bounded semantics for various temporal logics; – On CTL properties that have linear counterexamples; Some Theoretical Issues