CISC : Finite-State Verification

Size: px
Start display at page:

Download "CISC : Finite-State Verification"

Transcription

1 CISC : Finite-State Verification Stephen F. Siegel Department of Computer and Information Sciences University of Delaware Fall

2 The Software Crisis The desire for formal software verification arose out of the acknowledgment of an (apparently permanent) software crisis. 2

3 The Software Crisis The desire for formal software verification arose out of the acknowledgment of an (apparently permanent) software crisis. From crisis: Notion of software crisis arose in late 1960s refers to the difficulty of writing correct, understandable and verifiable computer programs 2

4 The Software Crisis The desire for formal software verification arose out of the acknowledgment of an (apparently permanent) software crisis. From crisis: Notion of software crisis arose in late 1960s refers to the difficulty of writing correct, understandable and verifiable computer programs Specifically: software projects run over-budget software projects run over-time software is of low quality software often does not meet requirements projects are often unmanageable and code difficult to maintain 2

5 1968 NATO Conference on Software Engineering 3

6 1968 NATO Conference on Software Engineering convened by NATO Science Committee refers to software crisis and software gap 4

7 1968 NATO Conference on Software Engineering convened by NATO Science Committee refers to software crisis and software gap One of the major motivations for the organizing of the conference was an awareness of the rapidly increasing importance of computer software systems in many activities of society. 4

8 1968 NATO Conference on Software Engineering convened by NATO Science Committee refers to software crisis and software gap One of the major motivations for the organizing of the conference was an awareness of the rapidly increasing importance of computer software systems in many activities of society....the consequences of software failure in all its aspects are becoming increasingly serious. Particularly alarming is the seemingly unavoidable fallibility of large software, since a malfunction in an advanced hardware-software system can be a matter of life and death, not only for individuals, but also for vehicles carrying hundreds of people and ultimately for nations as well. David and Fraser 4

9 1968 NATO Conference on Software Engineering convened by NATO Science Committee refers to software crisis and software gap One of the major motivations for the organizing of the conference was an awareness of the rapidly increasing importance of computer software systems in many activities of society....the consequences of software failure in all its aspects are becoming increasingly serious. Particularly alarming is the seemingly unavoidable fallibility of large software, since a malfunction in an advanced hardware-software system can be a matter of life and death, not only for individuals, but also for vehicles carrying hundreds of people and ultimately for nations as well. David and Fraser coined the term software engineering the application of a systematic, disciplined, quantifiable approach to the development, operation and maintenance of software 4

10 Edsger Dijkstra seminal contributions to programming languages and formal verification participated in the 1968 Conference The dissemination of knowledge is of obvious value the massive dissemination of error-loaded software is frightening. 5

11 Edsger Dijkstra seminal contributions to programming languages and formal verification participated in the 1968 Conference The dissemination of knowledge is of obvious value the massive dissemination of error-loaded software is frightening. 1972: ACM Turing Award Lecture discusses software crisis The Humble Programmer 5

12 Edsger Dijkstra seminal contributions to programming languages and formal verification participated in the 1968 Conference The dissemination of knowledge is of obvious value the massive dissemination of error-loaded software is frightening. 1972: ACM Turing Award Lecture discusses software crisis The Humble Programmer Program testing can be used to show the presence of bugs, but never to show their absence! 5

13 Edsger Dijkstra seminal contributions to programming languages and formal verification participated in the 1968 Conference The dissemination of knowledge is of obvious value the massive dissemination of error-loaded software is frightening. 1972: ACM Turing Award Lecture discusses software crisis The Humble Programmer Program testing can be used to show the presence of bugs, but never to show their absence! Computer Science is no more about computers than astronomy is about telescopes. 5

14 Edsger Dijkstra seminal contributions to programming languages and formal verification participated in the 1968 Conference The dissemination of knowledge is of obvious value the massive dissemination of error-loaded software is frightening. 1972: ACM Turing Award Lecture discusses software crisis The Humble Programmer Program testing can be used to show the presence of bugs, but never to show their absence! Computer Science is no more about computers than astronomy is about telescopes. Elegance is not a dispensable luxury but a quality that decides between success and failure. 5

15 Other sightings of the Software Crisis 1994: Scientific American, Software s Chronic Crisis, by W. Wayt Gibbs 1/4 large software development efforts canceled average development project overshoots schedule by 50% 3/4 of large systems are operating failures do not function as intended or are not used at all 6

16 Famous Software Failures: Ariane 5 Flight 501 References 5 Flight 501 Ariane 5: Flight 501 Failure: Report by the Inquiry Board, Prof. J. L. Lions, Chairman, July 19, Summary June 4, 1996: first launch of Ariane 5 $10 billion to develop carried four expensive (and uninsured) scientific satellites exploded 37 seconds after lift-off 7

17 Ariane 501: Software systems a computer controls the interial guidance system determines velocity, acceleration,... of rocket sends information to computer responsible for steering 8

18 Ariane 501: Software systems a computer controls the interial guidance system determines velocity, acceleration,... of rocket sends information to computer responsible for steering control code (Ada) reused from Ariane 4 used to align system before takeoff runs for 50 seconds after takeoff in case of launch countdown delays this feature not used in Ariane 5! 8

19 Ariane 501: Failure sequence 1. a 64-bit floating-point variable is used to represent horizontal velocity 9

20 Ariane 501: Failure sequence 1. a 64-bit floating-point variable is used to represent horizontal velocity 2. this is converted to a 16-bit signed integer 9

21 Ariane 501: Failure sequence 1. a 64-bit floating-point variable is used to represent horizontal velocity 2. this is converted to a 16-bit signed integer 3. the value was too large and an Ada exception was thrown 9

22 Ariane 501: Failure sequence 1. a 64-bit floating-point variable is used to represent horizontal velocity 2. this is converted to a 16-bit signed integer 3. the value was too large and an Ada exception was thrown 4. the exception was not caught by the code, causing computer to crash 9

23 Ariane 501: Failure sequence 1. a 64-bit floating-point variable is used to represent horizontal velocity 2. this is converted to a 16-bit signed integer 3. the value was too large and an Ada exception was thrown 4. the exception was not caught by the code, causing computer to crash 5. the backup guidance computer also crashed, for same reason 9

24 Ariane 501: Failure sequence 1. a 64-bit floating-point variable is used to represent horizontal velocity 2. this is converted to a 16-bit signed integer 3. the value was too large and an Ada exception was thrown 4. the exception was not caught by the code, causing computer to crash 5. the backup guidance computer also crashed, for same reason 6. guidance computer spewed diagnostic error messages to steering computer 9

25 Ariane 501: Failure sequence 1. a 64-bit floating-point variable is used to represent horizontal velocity 2. this is converted to a 16-bit signed integer 3. the value was too large and an Ada exception was thrown 4. the exception was not caught by the code, causing computer to crash 5. the backup guidance computer also crashed, for same reason 6. guidance computer spewed diagnostic error messages to steering computer 7. steering computer interpreted these as guidance information and made radical adjustments to correct course 9

26 Ariane 501: Failure sequence 1. a 64-bit floating-point variable is used to represent horizontal velocity 2. this is converted to a 16-bit signed integer 3. the value was too large and an Ada exception was thrown 4. the exception was not caught by the code, causing computer to crash 5. the backup guidance computer also crashed, for same reason 6. guidance computer spewed diagnostic error messages to steering computer 7. steering computer interpreted these as guidance information and made radical adjustments to correct course 8. rocket began to disintegrate due to extreme stresses from sharp attitude 9

27 Ariane 501: Failure sequence 1. a 64-bit floating-point variable is used to represent horizontal velocity 2. this is converted to a 16-bit signed integer 3. the value was too large and an Ada exception was thrown 4. the exception was not caught by the code, causing computer to crash 5. the backup guidance computer also crashed, for same reason 6. guidance computer spewed diagnostic error messages to steering computer 7. steering computer interpreted these as guidance information and made radical adjustments to correct course 8. rocket began to disintegrate due to extreme stresses from sharp attitude 9. rocket self-destructed 9

28 Ariane 501, cont. inertial guidance system code was extensively tested 10

29 Ariane 501, cont. inertial guidance system code was extensively tested... using parameters from Ariane 4 horizontal velocity increases 5 times faster in Ariane 5 10

30 Ariane 501, cont. inertial guidance system code was extensively tested... using parameters from Ariane 4 horizontal velocity increases 5 times faster in Ariane 5 recommendations of Inquiry Board...set up a team that will prepare the procedure for qualifying software, propose stringent rules for confirming such qualification, and ascertain that specification, verification and testing of software are of a consistently high quality... 10

31 Famous Software Failures: Therac-25 References Nancy Leveson, Clark S. Turner, An Investigation of the Therac-25 Accidents, IEEE Computer, Vol. 26, No. 7, July 1993, http: //courses.cs.vt.edu/ cs3604/lib/therac 25/Therac 1.html Nancy Leveson, Software: System Safety and Computers, Addison-Wesley

32 Therac-25 computerized radiation therapy machine : 6 known massive radiation overdoses at least 5 deaths and serious injuries programming errors have been reduced by extensive testing... programming errors also existed in Therac-20 but were never observed due to hardware safety interlocks that were removed in the Therac-25 12

33 Therac-25, cont. The equipment control task did not properly synchronize with the operator interface task, so that race conditions occurred if the operator changed the setup too quickly. This was evidently missed during testing, since it took some practice before operators were able to work quickly enough for the problem to occur. (Wikipedia) 13

34 Therac-25, cont. The equipment control task did not properly synchronize with the operator interface task, so that race conditions occurred if the operator changed the setup too quickly. This was evidently missed during testing, since it took some practice before operators were able to work quickly enough for the problem to occur. (Wikipedia) The software was highly reliable. It worked tens of thousands of times before overdosing anyone, and occurrences of erroneous behavior were few and far between. AECL assumed that their software was safe because it was reliable... Leveson 13

35 Therac-25, cont. The equipment control task did not properly synchronize with the operator interface task, so that race conditions occurred if the operator changed the setup too quickly. This was evidently missed during testing, since it took some practice before operators were able to work quickly enough for the problem to occur. (Wikipedia) The software was highly reliable. It worked tens of thousands of times before overdosing anyone, and occurrences of erroneous behavior were few and far between. AECL assumed that their software was safe because it was reliable... Leveson The software should be subjected to extensive testing and formal analysis at the module and software level; system testing alone is not adequate. Leveson 13

36 Other examples from the Software Crisis From Dependable Software by Design, Daniel Jackson, Scientific American, June 2006 Denver airport baggage handler software problems delayed airport s opening by 16 months hundreds of millions of dollars in cost overruns finally gave up IRS, FBI, and FAA systems 14

37 Scientific Computing Some applications of scientific computing: study of fluid turbulence study of cosmological structure formation study of atomic and molecular structure molecular biology climate modeling automobile, aircraft design 15

38 Scientific Computing Some applications of scientific computing: study of fluid turbulence study of cosmological structure formation study of atomic and molecular structure molecular biology climate modeling automobile, aircraft design A third path to scientific understanding empirical (experimentation) 2. deductive (math, logic) 3. simulation (using computers) 15

39 Scientific Computing, cont. codes are exceedingly complex typically parallel (using, e.g., MPI) many sources of nondeterminism aspects of program execution which are not specified by the program s code relative ordering of execution steps from the parallel processes can differ from execution to execution 16

40 Software Crisis hits Scientific Computing 17

41 Computational Science Demands a New Paradigm by Douglass E. Post and Lawrence G. Votta Physics Today, January 2005 The field has reached a new threshold.... New methods of verifying and validating complex codes are mandatory if computational science is to fulfill its promise for science and society....diligence and alertness are far from a guarantee that the code is free of defects. Better verification techniques are desperately needed. 18

42 Current Methods for Dealing with the Crisis: Testing But testing exhibits serious limitations: lack of coverage only a tiny fraction of inputs can be tested (Ariane 5) 19

43 Current Methods for Dealing with the Crisis: Testing But testing exhibits serious limitations: lack of coverage only a tiny fraction of inputs can be tested (Ariane 5) nondeterminism correct result on one execution does not even guarantee correct result on another execution with the same input (Therac-25) 19

44 Current Methods for Dealing with the Crisis: Testing But testing exhibits serious limitations: lack of coverage only a tiny fraction of inputs can be tested (Ariane 5) nondeterminism correct result on one execution does not even guarantee correct result on another execution with the same input (Therac-25) problem of oracles in scientific computation, often don t know correct result for a given test input, so can t tell if the observed result is correct 19

45 Validation approaches Validation Testing 20

46 Validation approaches Validation Testing Formal Verification Theorem Proving Theorem Proving (deductive reasoning) construct proof that program satisfies a property axioms, definitions, theorems may be partially automated provides a high level of confidence applies to systems of arbitrary size limitations theoretical limits requires enormous skill very time-consuming 20

47 Validation approaches Testing Validation Theorem Proving Formal Verification Finite-State Verification Finite-State Verification (FSV) 1. construct a model of the program using only a finite number of states 2. formalize correctness properties for the model 3. use automated algorithmic techniques to verify that all executions of the model satisfy the properties Model Checking 20

48 Finite-State Verification 1. construct a model of the program using only a finite number of states 2. formalize correctness properties for the model 3. use automated algorithmic techniques to verify that all executions of the model satisfy the properties 21

49 Finite-State Verification 1. construct a model of the program using only a finite number of states 2. formalize correctness properties for the model 3. use automated algorithmic techniques to verify that all executions of the model satisfy the properties what is a model? a simplified or abstract version of the program, often written in a modeling language for a particular FSV tool floating-point variables are usually not used in models 21

50 Finite-State Verification 1. construct a model of the program using only a finite number of states 2. formalize correctness properties for the model 3. use automated algorithmic techniques to verify that all executions of the model satisfy the properties what is a model? a simplified or abstract version of the program, often written in a modeling language for a particular FSV tool floating-point variables are usually not used in models what is a state of the model? a vector with one component for each variable in the model 21

51 Finite-State Verification 1. construct a model of the program using only a finite number of states 2. formalize correctness properties for the model 3. use automated algorithmic techniques to verify that all executions of the model satisfy the properties what is a model? a simplified or abstract version of the program, often written in a modeling language for a particular FSV tool floating-point variables are usually not used in models what is a state of the model? a vector with one component for each variable in the model what are typical properties of models? freedom from deadlock assertions about the state assert(x==y*z); assertions about the order of events (temporal logic) ((x==1) (y==1)) 21

52 Finite-State models the model can be tailor-made for a specific property example: parallel matrix multiplication program property: freedom from deadlock model: remove all floating-point variables remove all statements that assign to those variables replace all messages by 1 result: MPI communication skeleton of the program 22

53 Finite-State models the model can be tailor-made for a specific property example: parallel matrix multiplication program property: freedom from deadlock model: remove all floating-point variables remove all statements that assign to those variables replace all messages by 1 result: MPI communication skeleton of the program ideally, models should be conservative: for every execution of the original program there is a corresponding execution of the model if a property holds for all executions of a conservative model, it holds for all executions of the original program 22

54 Finite-State models the model can be tailor-made for a specific property example: parallel matrix multiplication program property: freedom from deadlock model: remove all floating-point variables remove all statements that assign to those variables replace all messages by 1 result: MPI communication skeleton of the program ideally, models should be conservative: for every execution of the original program there is a corresponding execution of the model if a property holds for all executions of a conservative model, it holds for all executions of the original program but sometimes we must compromise impose small bounds on configuration Small Configuration Hypothesis defects almost always manifest themselves in small configurations 22

55 Reachability state: a vector s with one component for every variable in the model 23

56 Reachability state: a vector s with one component for every variable in the model initial state: the state s 0 for the initial values of the variables 23

57 Reachability state: a vector s with one component for every variable in the model initial state: the state s 0 for the initial values of the variables next(s): set of all states reachable from s by a single execution step 23

58 Reachability state: a vector s with one component for every variable in the model initial state: the state s 0 for the initial values of the variables next(s): set of all states reachable from s by a single execution step state space: the directed graph with nodes: states edges: s t iff t next(s) 23

59 Reachability state: a vector s with one component for every variable in the model initial state: the state s 0 for the initial values of the variables next(s): set of all states reachable from s by a single execution step state space: the directed graph with nodes: states edges: s t iff t next(s) reachable state space: subgraph G of all states reachable from s 0 23

60 Reachability state: a vector s with one component for every variable in the model initial state: the state s 0 for the initial values of the variables next(s): set of all states reachable from s by a single execution step state space: the directed graph with nodes: states edges: s t iff t next(s) reachable state space: subgraph G of all states reachable from s 0 can be computed by starting with s 0, computing all next states, computing all next states of those states,... 23

61 Reachability state: a vector s with one component for every variable in the model initial state: the state s 0 for the initial values of the variables next(s): set of all states reachable from s by a single execution step state space: the directed graph with nodes: states edges: s t iff t next(s) reachable state space: subgraph G of all states reachable from s 0 can be computed by starting with s 0, computing all next states, computing all next states of those states,... paths through G correspond to executions of the model 23

62 Example: Shared Resource boolean x; proc rw0 { while (true) { x := 0; synch(); if (x == 0) use_resource(); proc rw1 { while (true) { x := 1; synch(); if (x == 1) use_resource();

63 Example: Shared Resource Property 1: Freedom from deadlock The program does not deadlock Property 2: Mutual exclusion It is never the case that both processes use the resource 032 at020 the same102 time. 123 Property 3: Liveness The resource 002will eventually 030 be 103used. 120 State: [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); if (x == 0) use_resource(); proc rw1 { while (true) { x := 1; synch(); if (x == 1) use_resource();

64 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); if (x == 0) use_resource(); proc rw1 { while (true) { x := 1; synch(); if (x == 1) use_resource();

65 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); if (x == 0) use_resource(); proc rw1 { while (true) { x := 1; synch(); if (x == 1) use_resource();

66 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); 2 if (x == 0) use_resource(); proc rw1 { while (true) { 0 x := 1; 1 synch(); if (x == 1) use_resource();

67 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); 2 if (x == 0) use_resource(); proc rw1 { while (true) { 0 x := 1; 1 synch(); if (x == 1) use_resource();

68 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); 2 if (x == 0) use_resource(); proc rw1 { while (true) { 0 x := 1; 1 synch(); if (x == 1) use_resource();

69 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); 2 if (x == 0) use_resource(); proc rw1 { while (true) { 0 x := 1; 1 synch(); if (x == 1) use_resource();

70 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); 2 if (x == 0) use_resource(); proc rw1 { while (true) { 0 x := 1; 1 synch(); if (x == 1) use_resource();

71 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); 2 if (x == 0) use_resource(); proc rw1 { while (true) { 0 x := 1; 1 synch(); if (x == 1) use_resource();

72 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); 2 if (x == 0) use_resource(); proc rw1 { while (true) { 0 x := 1; 1 synch(); if (x == 1) use_resource();

73 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); 2 if (x == 0) use_resource(); proc rw1 { while (true) { 0 x := 1; 1 synch(); if (x == 1) use_resource();

74 Example: Shared Resource [x, pc 0, pc 1 ] boolean x; proc rw0 { while (true) { x := 0; synch(); 2 if (x == 0) use_resource(); proc rw1 { while (true) { 0 x := 1; 1 synch(); if (x == 1) use_resource();

75 FSV: strengths and weaknesses strengths can prove things about all possible executions of a program can be (close to) fully automated produces a trace if property does not hold 25

76 FSV: strengths and weaknesses strengths can prove things about all possible executions of a program can be (close to) fully automated produces a trace if property does not hold weaknesses model construction problems the result is only as good as the model state space explosion problem the number of states typically grows exponentially with the number of processes 25

77 The current state of FSV progress in automatic model extraction Bandera and Bogor (Java) Java PathFinder (Java) Microsoft s SLAM toolset (C) BLAST (C) 26

78 The current state of FSV progress in automatic model extraction Bandera and Bogor (Java) Java PathFinder (Java) Microsoft s SLAM toolset (C) BLAST (C) development of techniques to combat state explosion partial order reductions (SPIN) use of BDDs to represent state space (SMV, NuSMV) symmetry abstraction counterexample-guided refinement 26

79 The current state of FSV progress in automatic model extraction Bandera and Bogor (Java) Java PathFinder (Java) Microsoft s SLAM toolset (C) BLAST (C) development of techniques to combat state explosion partial order reductions (SPIN) use of BDDs to represent state space (SMV, NuSMV) symmetry abstraction counterexample-guided refinement increasingly used in industry Intel, Motorola, Microsoft,... numerous conferences and workshops 26

80 Introduction to the SPIN Model Checker spinroot.com open source development started in the 1980s freely available since 1991 ACM Systems Software Award for 2001 geared towards software verification input language: Promela properties specified as assertions, or LTL formulas (converted to Büchi automata) Gerard Holzmann originally Bell Labs now NASA JPL 27

81 Promela encoding of Shared Resource Example bit x = 0; chan synch = [0] of {bit; proctype rw0() { do :: x = 0; synch!0; if :: x == 0 -> useresource: skip :: else fi od 28 proctype rw1() { do :: x = 1; synch?0; if :: x == 1 -> useresource: skip :: else fi od init { atomic { run rw0(); run rw1()

82 Property Specifications for Shared Resource 1. freedom from deadlock checked by default (improper endstates) 2. mutual exclusion 2.1 add line #define u0 2.2 add line #define u1 2.3 LTL formula for violation: <>(u0 && u1) 2.4 convert LTL formula to never claim spin -f <>(u0 && u1) 2.5 insert never claim into Promela model 3. liveness []!u0 29

83 Demo: Using SPIN on Shared Resource Example 1. verification of freedom from deadlock 1.1 spin -a shared-deadlock.prom 1.2 cc -o pan pan.c 1.3./pan 2. verification of mutual exclusion 2.1 spin -a shared-mutex.prom 2.2 cc -o pan pan.c 2.3./pan -a 3. verification of liveness 3.1 spin -a shared-live.prom 3.2 cc -o pan pan.c 3.3./pan -a 3.4 spin -t -p -g shared-live.prom 30

Verifying Parallel Programs

Verifying Parallel Programs Verifying Parallel Programs Stephen F. Siegel The Verified Software Laboratory Department of Computer and Information Sciences University of Delaware, Newark, USA http://www.cis.udel.edu/~siegel SIG-NEWGRAD

More information

Introduction to CS 270 Math Foundations of CS

Introduction to CS 270 Math Foundations of CS Introduction to CS 270 Math Foundations of CS Verification of Computer Systems Jeremy Johnson Drexel University Course Description Emphasizes analytic problem-solving and introduction of mathematical material

More information

C07: Testing and JUnit

C07: Testing and JUnit CISC 3120 C07: Testing and JUnit Hui Chen Department of Computer & Information Science CUNY Brooklyn College 9/19/2017 CUNY Brooklyn College 1 Outline Recap and issues Grades and feedback Assignments &

More information

Model Checking. Automatic Verification Model Checking. Process A Process B. when not possible (not AI).

Model Checking. Automatic Verification Model Checking. Process A Process B. when not possible (not AI). Sérgio Campos scampos@dcc.ufmg.br Why? Imagine the implementation of a complex hardware or software system: A 100K gate ASIC perhaps 100 concurrent modules; A flight control system dozens of concurrent

More information

Model-Checking Concurrent Systems. The Model Checker Spin. The Model Checker Spin. Wolfgang Schreiner

Model-Checking Concurrent Systems. The Model Checker Spin. The Model Checker Spin. Wolfgang Schreiner Model-Checking Concurrent Systems Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at 1.

More information

Research Collection. Formal background and algorithms. Other Conference Item. ETH Library. Author(s): Biere, Armin. Publication Date: 2001

Research Collection. Formal background and algorithms. Other Conference Item. ETH Library. Author(s): Biere, Armin. Publication Date: 2001 Research Collection Other Conference Item Formal background and algorithms Author(s): Biere, Armin Publication Date: 2001 Permanent Link: https://doi.org/10.3929/ethz-a-004239730 Rights / License: In Copyright

More information

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements System Correctness EEC 421/521: Software Engineering A Whirlwind Intro to Software Model Checking A system is correct when it meets its requirements a design without requirements cannot be right or wrong,

More information

The Spin Model Checker : Part I/II

The Spin Model Checker : Part I/II The Spin Model Checker : Part I/II Moonzoo Kim CS Dept. KAIST Korea Advanced Institute of Science and Technology Motivation: Tragic Accidents Caused by SW Bugs 2 Cost of Software Errors June 2002 Software

More information

Model-Checking Concurrent Systems

Model-Checking Concurrent Systems Model-Checking Concurrent Systems Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang

More information

Tool demonstration: Spin

Tool demonstration: Spin Tool demonstration: Spin 1 Spin Spin is a model checker which implements the LTL model-checking procedure described previously (and much more besides). Developed by Gerard Holzmann of Bell Labs Has won

More information

Program Verification. Aarti Gupta

Program Verification. Aarti Gupta Program Verification Aarti Gupta 1 Agenda Famous bugs Common bugs Testing (from lecture 6) Reasoning about programs Techniques for program verification 2 Famous Bugs The first bug: A moth in a relay (1945)

More information

The SPIN Model Checker

The SPIN Model Checker The SPIN Model Checker Metodi di Verifica del Software Andrea Corradini Lezione 1 2013 Slides liberamente adattate da Logic Model Checking, per gentile concessione di Gerard J. Holzmann http://spinroot.com/spin/doc/course/

More information

Introduction & Formal Methods

Introduction & Formal Methods Introduction & Formal Methods http://d3s.mff.cuni.cz Jan Kofroň CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Introduction to dependable systems NSWE 002 What you learn: Dependable systems

More information

Software Testing Lecture 1. Justin Pearson

Software Testing Lecture 1. Justin Pearson Software Testing Lecture 1 Justin Pearson 2017 1 / 50 Four Questions Does my software work? 2 / 50 Four Questions Does my software work? Does my software meet its specification? 3 / 50 Four Questions Does

More information

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab)

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Richard M. Murray Nok Wongpiromsarn Ufuk Topcu Calornia Institute of Technology AFRL, 25 April 2012 Outline Spin model checker: modeling

More information

INF672 Protocol Safety and Verification. Karthik Bhargavan Xavier Rival Thomas Clausen

INF672 Protocol Safety and Verification. Karthik Bhargavan Xavier Rival Thomas Clausen INF672 Protocol Safety and Verication Karthik Bhargavan Xavier Rival Thomas Clausen 1 Course Outline Lecture 1 [Today, Sep 15] Introduction, Motivating Examples Lectures 2-4 [Sep 22,29, Oct 6] Network

More information

Using Model Checking with Symbolic Execution to Verify Parallel Numerical Programs

Using Model Checking with Symbolic Execution to Verify Parallel Numerical Programs Using Model Checking with Symbolic Execution to Verify Parallel Numerical Programs Stephen F. Siegel 1 Anastasia Mironova 2 George S. Avrunin 1 Lori A. Clarke 1 1 University of Massachusetts Amherst 2

More information

Specification language Z. Some notation

Specification language Z. Some notation Specification language Z Defines the data, types, functions, and relationships among these in a specification General syntax: 1 Some notation ΞX State X doesn t change X State X changes ΘS =ΘS S invariant

More information

Patrick Trentin Formal Methods Lab Class, March 03, 2017

Patrick Trentin  Formal Methods Lab Class, March 03, 2017 Spin: Introduction Patrick Trentin patrick.trentin@unitn.it http://disi.unitn.it/trentin Formal Methods Lab Class, March 03, 2017 These slides are derived from those by Stefano Tonetta, Alberto Griggio,

More information

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis II

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis II Distributed Systems Programming (F21DS1) SPIN: Formal Analysis II Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Introduce

More information

Formal Methods for Software Development

Formal Methods for Software Development Formal Methods for Software Development Model Checking with Temporal Logic Wolfgang Ahrendt 21st September 2018 FMSD: Model Checking with Temporal Logic /GU 180921 1 / 37 Model Checking Check whether a

More information

Model checking Timber program. Paweł Pietrzak

Model checking Timber program. Paweł Pietrzak Model checking Timber program Paweł Pietrzak 1 Outline Background on model checking (spam?) The SPIN model checker An exercise in SPIN - model checking Timber Deriving finite models from Timber programs

More information

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN Promela and SPIN Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH Promela and SPIN Promela (Protocol Meta Language): Language for modelling discrete, event-driven

More information

Software Model Checking

Software Model Checking 20 ans de Recherches sur le Software Model Checking 1989 1994 2006 2009 Université de Liège Bell Labs Microsoft Research Patrice Godefroid Page 1 Mars 2009 Model Checking A B C Each component is modeled

More information

Tutorial on Model Checking Modelling and Verification in Computer Science

Tutorial on Model Checking Modelling and Verification in Computer Science Tutorial on Model Checking Modelling and Verification in Computer Science Armin Biere Institute for Formal Models and Verification Johannes Kepler University, Linz, Austria Abstract. This paper serves

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Lecture 5 Linear Temporal Logic (cont.) Prof. Dr. Joel Greenyer May 2, 2013 (Last Time:) LTL Semantics (Informally) LTL Formulae are interpreted on

More information

Sérgio Campos, Edmund Clarke

Sérgio Campos, Edmund Clarke Sérgio Campos, Edmund 1 / 23 Model checking is a technique that relies on building a finite model of a system and checking that a desired property holds in that model. The check is performed by an exhaustive

More information

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis I

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis I Distributed Systems Programming (F21DS1) SPIN: Formal Analysis I Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Introduce

More information

Lecture 2: Symbolic Model Checking With SAT

Lecture 2: Symbolic Model Checking With SAT Lecture 2: Symbolic Model Checking With SAT Edmund M. Clarke, Jr. School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 (Joint work over several years with: A. Biere, A. Cimatti, Y.

More information

Lecture 1: Model Checking. Edmund Clarke School of Computer Science Carnegie Mellon University

Lecture 1: Model Checking. Edmund Clarke School of Computer Science Carnegie Mellon University Lecture 1: Model Checking Edmund Clarke School of Computer Science Carnegie Mellon University 1 Cost of Software Errors June 2002 Software bugs, or errors, are so prevalent and so detrimental that they

More information

More on Verification and Model Checking

More on Verification and Model Checking More on Verification and Model Checking Wednesday Oct 07, 2015 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/60 Course fair! 2/60 Exam st October 21, 8:00 13:00 If you want to participate,

More information

SPIN: Introduction and Examples

SPIN: Introduction and Examples SPIN: Introduction and Examples Alessandra Giordani agiordani@disi.unitn.it http://disi.unitn.it/~agiordani Formal Methods Lab Class, September 28, 2014 *These slides are derived from those by Stefano

More information

Formal Specification and Verification

Formal Specification and Verification Formal Specification and Verification Model Checking with Temporal Logic Bernhard Beckert Based on a lecture by Wolfgang Ahrendt and Reiner Hähnle at Chalmers University, Göteborg Formal Specification

More information

Software Quality. What is Good Software?

Software Quality. What is Good Software? Software Quality CS A470 What is Good Software? Depends on your point of view Five perspectives Transcendental view. Quality can be recognized but hard to define User view. Fitness for purpose Often adopted

More information

Introduction to Axiomatic Semantics (1/2)

Introduction to Axiomatic Semantics (1/2) #1 Introduction to Axiomatic Semantics (1/2) How s The Homework Going? Remember: just do the counterexample guided abstraction refinement part of DPLL(T). If you notice any other errors, those are good

More information

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271 Mel Checking LTL Property System Mel Mel Checking CS 4271 Mel Checking OR Abhik Roychoudhury http://www.comp.nus.edu.sg/~abhik Yes No, with Counter-example trace 2 Recap: Mel Checking for mel-based testing

More information

Program Validation and Testing

Program Validation and Testing Program Validation and Testing José Costa Software for Embedded Systems Departamento de Engenharia Informática (DEI) Instituto Superior Técnico 2014-04-07 José Costa (DEI/IST) Program Validation and Testing

More information

(See related materials in textbook.) CSE 435: Software Engineering (slides adapted from Ghezzi et al & Stirewalt

(See related materials in textbook.) CSE 435: Software Engineering (slides adapted from Ghezzi et al & Stirewalt Verification (See related materials in textbook.) Outline What are the goals of verification? What are the main approaches to verification? What kind of assurance do we get through testing? How can testing

More information

Formal Verification by Model Checking

Formal Verification by Model Checking Formal Verication by Model Checking Jonathan Aldrich Carnegie Mellon University Based on slides developed by Natasha Sharygina 17-654/17-754: Analysis of Software Artacts Spring 2006 1 CTL Model Checking

More information

Program verification. Generalities about software Verification Model Checking. September 20, 2016

Program verification. Generalities about software Verification Model Checking. September 20, 2016 Program verification Generalities about software Verification Model Checking Laure Gonnord David Monniaux September 20, 2016 1 / 43 The teaching staff Laure Gonnord, associate professor, LIP laboratory,

More information

Java PathFinder JPF 2 Second Generation of Java Model Checker

Java PathFinder JPF 2 Second Generation of Java Model Checker Java PathFinder JPF 2 Second Generation of Java Model Checker Guenther Brand Mat. Nr. 9430535 27. 06. 2003 Abstract This essay is based on the papers Java PathFinder, Second Generation of Java Model Checker

More information

Writing better code Loop invariants Correctness. John Edgar 2

Writing better code Loop invariants Correctness. John Edgar 2 Writing better code Loop invariants Correctness John Edgar 2 Not all code is equal Correct and reliable code is one of our goals Is a new car correct or reliable? Other characteristics of good code Affordable

More information

INF5140: Specification and Verification of Parallel Systems

INF5140: Specification and Verification of Parallel Systems INF5140: Specification and Verification of Parallel Systems Lecture 09 Defining Correctness Claims Gerar Schneider Department of Informatics University of Oslo INF5140, Spring 2007 Gerar Schneider (Ifi,

More information

CPSC 427: Object-Oriented Programming

CPSC 427: Object-Oriented Programming CPSC 427: Object-Oriented Programming Michael J. Fischer Lecture 20 November 12, 2018 CPSC 427, Lecture 20, November 12, 2018 1/26 Rethrowing Exceptions Uncaught Exceptions Singleton Design Pattern Smart

More information

Formal Methods in Practice: Tools and Examples

Formal Methods in Practice: Tools and Examples Formal Methods in Practice: Tools and Examples Alessio Ferrari 1 alessio.ferrari@ge.com 1 University of Florence, D.S.I., Florence, Italy November 29, 2009 Ferrari (University of Florence) Formal Methods

More information

Software Engineering

Software Engineering CSC40232: SOFTWARE ENGINEERING Professor: Jane Cleland Huang : Introduction Wednesday, January 18 th sarec.nd.edu/courses/se2017 Department of Computer Science and Engineering Software Engineering Software

More information

Proving Dekker with SPIN and PROMELA

Proving Dekker with SPIN and PROMELA 15-410...fairness disabled... Proving Dekker with SPIN and PROMELA Joshua Wise With help from Greg Hartman L36_SPIN 1 Synchronization Project 4 due Wednesday Everyone having fun? Kernel interviews If you

More information

Patrick Trentin Formal Methods Lab Class, Feb 26, 2016

Patrick Trentin  Formal Methods Lab Class, Feb 26, 2016 Spin: Introduction Patrick Trentin patrick.trentin@unitn.it http://disi.unitn.it/~trentin Formal Methods Lab Class, Feb 26, 2016 These slides are derived from those by Stefano Tonetta, Alberto Griggio,

More information

Automated Freedom from Interference Analysis for Automotive Software

Automated Freedom from Interference Analysis for Automotive Software Automated Freedom from Interference Analysis for Automotive Software Florian Leitner-Fischer ZF TRW 78315 Radolfzell, Germany Email: florian.leitner-fischer@zf.com Stefan Leue Chair for Software and Systems

More information

Distributed Systems Programming (F21DS1) Formal Verification

Distributed Systems Programming (F21DS1) Formal Verification Distributed Systems Programming (F21DS1) Formal Verification Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Focus on

More information

Introduction to Model Checking

Introduction to Model Checking Introduction to Model Checking René Thiemann Institute of Computer Science University of Innsbruck WS 2007/2008 RT (ICS @ UIBK) week 4 1/23 Outline Promela - Syntax and Intuitive Meaning Promela - Formal

More information

Warm-Up Problem. Let be a set of well-formed Predicate logic formulas. Let be well-formed Predicate logic formulas. Prove or disprove the following.

Warm-Up Problem. Let be a set of well-formed Predicate logic formulas. Let be well-formed Predicate logic formulas. Prove or disprove the following. Warm-Up Problem Let be a set of well-formed Predicate logic formulas Let be well-formed Predicate logic formulas Prove or disprove the following If then 1/35 Program Verification Carmen Bruni Lecture 18

More information

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab)

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Richard M. Murray Nok Wongpiromsarn Ufuk Topcu California Institute of Technology EECI 19 Mar 2013 Outline Spin model checker: modeling

More information

Model Checking. Dragana Cvijanovic

Model Checking. Dragana Cvijanovic Model Checking Dragana Cvijanovic d.cvijanovic@cs.ucl.ac.uk 1 Introduction Computerised systems pervade more and more our everyday lives. Digital technology is now used to supervise critical functions

More information

Lecture1: Symbolic Model Checking with BDDs. Edmund M. Clarke, Jr. Computer Science Department Carnegie Mellon University Pittsburgh, PA 15213

Lecture1: Symbolic Model Checking with BDDs. Edmund M. Clarke, Jr. Computer Science Department Carnegie Mellon University Pittsburgh, PA 15213 Lecture: Symbolic Model Checking with BDDs Edmund M Clarke, Jr Computer Science Department Carnegie Mellon University Pittsburgh, PA 523 Temporal Logic Model Checking Specification Language: A propositional

More information

Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; EEC 421/521: Software Engineering. Thread Interleaving SPIN. Model Checking using SPIN

Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; EEC 421/521: Software Engineering. Thread Interleaving SPIN. Model Checking using SPIN EEC 421/521: Software Engineering Model Checking using SPIN 4/29/08 EEC 421/521: Software Engineering 1 Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; thread_1(void) /* initialize p, q, and

More information

Leveraging Formal Methods for Verifying Models and Embedded Code Prashant Mathapati Application Engineering Group

Leveraging Formal Methods for Verifying Models and Embedded Code Prashant Mathapati Application Engineering Group Leveraging Formal Methods for Verifying Models and Embedded Code Prashant Mathapati Application Engineering Group 2014 The MathWorks, Inc. 1 The Cost of Failure News reports: Recall Due to ECU software

More information

Static Analysis Techniques

Static Analysis Techniques oftware Design (F28SD2): Static Analysis Techniques 1 Software Design (F28SD2) Static Analysis Techniques Andrew Ireland School of Mathematical and Computer Science Heriot-Watt University Edinburgh oftware

More information

software engineering: what is it? software engineering: who? software engineering: why?

software engineering: what is it? software engineering: who? software engineering: why? topics: software engineering cis20.1 design and implementation of software applications I fall 2007 lecture # IV.1: software engineering software engineering: what is it? Stephen Schach: Software engineering

More information

FORMAL METHODS IN NETWORKING COMPUTER SCIENCE 598D, SPRING 2010 PRINCETON UNIVERSITY LIGHTWEIGHT MODELING IN PROMELA/SPIN AND ALLOY

FORMAL METHODS IN NETWORKING COMPUTER SCIENCE 598D, SPRING 2010 PRINCETON UNIVERSITY LIGHTWEIGHT MODELING IN PROMELA/SPIN AND ALLOY FORMAL METHODS IN NETWORKING COMPUTER SCIENCE 598D, SPRING 2010 PRINCETON UNIVERSITY LIGHTWEIGHT MODELING IN PROMELA/SPIN AND ALLOY Pamela Zave AT&T Laboratories Research Florham Park, New Jersey, USA

More information

LTL Reasoning: How It Works

LTL Reasoning: How It Works Distributed Systems rogramming F21DS1 LTL Reasoning: How It Works Andrew Ireland School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Distributed Systems rogramming F21DS1 2 Overview

More information

When Embedded Systems Attack. Unit 22. Therac-25. Therac-25. Embedded Failures. Embedded systems can fail for a variety of reasons

When Embedded Systems Attack. Unit 22. Therac-25. Therac-25. Embedded Failures. Embedded systems can fail for a variety of reasons 22.1 22.2 When Embedded Systems Attack Unit 22 Embedded Failures Embedded systems can fail for a variety of reasons Electrical problems Mechanical problems Errors in the programming Incorrectly specified

More information

Basic Definitions: Testing

Basic Definitions: Testing Basic Definitions: Testing l What is software testing? Running a program In order to find faults a.k.a. defects a.k.a. errors a.k.a. flaws a.k.a. faults a.k.a. BUGS 1 Bugs Hopper s bug (moth stuck in a

More information

Introduction to Software Verification

Introduction to Software Verification Introduction to Software Verification Anca Muscholl, Marc Zeitoun, LaBRI, U. Bordeaux January 2018 Hunting bugs: why? Bugs are an integral part of computer science. Are bugs really serious? No, just a

More information

Advanced practical Programming for Scientists

Advanced practical Programming for Scientists Advanced practical Programming for Scientists Thorsten Koch Zuse Institute Berlin TU Berlin SS2017 The Zen of Python, by Tim Peters (Part 2) There should be one-- and preferably only one --obvious way

More information

CPSC 427: Object-Oriented Programming

CPSC 427: Object-Oriented Programming CPSC 427: Object-Oriented Programming Michael J. Fischer Lecture 22 November 28, 2016 CPSC 427, Lecture 22 1/43 Exceptions (continued) Code Reuse Linear Containers Ordered Containers Multiple Inheritance

More information

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning Lecture 1 Contracts 15-122: Principles of Imperative Computation (Fall 2018) Frank Pfenning In these notes we review contracts, which we use to collectively denote function contracts, loop invariants,

More information

Using Spin to Help Teach Concurrent Programming

Using Spin to Help Teach Concurrent Programming Using Spin to Help Teach Concurrent Programming John Regehr May 1, 1998 1 Introduction and Motivation Writing correct concurrent programs is very difficult; race conditions, deadlocks, and livelocks can

More information

Formal methods What are they? Uses Tools Application to software development

Formal methods What are they? Uses Tools Application to software development FormalMethods Page 1 Formal methods introduction 9:26 PM Formal methods What are they? Uses Tools Application to software development FormalMethods Page 2 What are formal methods? 9:49 PM Do you have any

More information

Combining Complementary Formal Verification Strategies to Improve Performance and Accuracy

Combining Complementary Formal Verification Strategies to Improve Performance and Accuracy Combining Complementary Formal Verification Strategies to Improve Performance and Accuracy David Owen June 15, 2007 2 Overview Four Key Ideas A Typical Formal Verification Strategy Complementary Verification

More information

Formal Methods for Software Development

Formal Methods for Software Development Formal Methods for Software Development Verification with Spin Wolfgang Ahrendt 07 September 2018 FMSD: Spin /GU 180907 1 / 34 Spin: Previous Lecture vs. This Lecture Previous lecture Spin appeared as

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2012 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

Using Model Checking with Symbolic Execution for the Verification of Data-Dependent Properties of MPI-Based Parallel Scientific Software

Using Model Checking with Symbolic Execution for the Verification of Data-Dependent Properties of MPI-Based Parallel Scientific Software Using Model Checking with Symbolic Execution for the Verification of Data-Dependent Properties of MPI-Based Parallel Scientific Software Anastasia Mironova Problem It is hard to create correct parallel

More information

Having a BLAST with SLAM

Having a BLAST with SLAM Having a BLAST with SLAM # #2 Topic: Software Model Checking via Counter-Example Guided Abstraction Refinement There are easily two dozen SLAM/BLAST/MAGIC papers; I will skim. #3 SLAM Overview INPUT: Program

More information

THE MODEL CHECKER SPIN

THE MODEL CHECKER SPIN THE MODEL CHECKER SPIN Shin Hong, KAIST 17 th April,2007 1/33 Contents Introduction PROMELA Linear Temporal Logic Automata-theoretic software verification Example : Simple Elevator 2 SPIN is a software

More information

Automated Reasoning. Model Checking with SPIN (II)

Automated Reasoning. Model Checking with SPIN (II) Automated Reasoning Model Checking with SPIN (II) Alan Bundy page 1 Verifying Global Properties Assertions can be used to verify a property locally For example, place assert(memreturned) at the end of

More information

Introduction to Axiomatic Semantics (1/2)

Introduction to Axiomatic Semantics (1/2) #1 Introduction to Axiomatic Semantics (1/2) How s The Homework Going? Remember that you can t just define a meaning function in terms of itself you must use some fixed point machinery. #2 #3 Observations

More information

Introduction to Formal Methods

Introduction to Formal Methods Introduction to Formal Methods October 6, 2005 Errors and their sources What are formal methods? Techniques and applications Introduction to Formal Methods 2 Course objectives be able to verify correct

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2010 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

SCR*: A Toolset for Specifying and. Analyzing Software Requirements? Constance Heitmeyer, James Kirby, Bruce Labaw and Ramesh Bharadwaj

SCR*: A Toolset for Specifying and. Analyzing Software Requirements? Constance Heitmeyer, James Kirby, Bruce Labaw and Ramesh Bharadwaj SCR*: A Toolset for Specifying and Analyzing Software Requirements? Constance Heitmeyer, James Kirby, Bruce Labaw and Ramesh Bharadwaj Naval Research Laboratory, Code 5546, Washington, DC 20375, USA Abstract.

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Bernhard Beckert Mattias Ulbrich SS 2017 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State of Baden-Württemberg

More information

Producing Production Quality Software. Lecture 12: Concurrent and Distributed Programming Prof. Arthur P. Goldberg Fall, 2004

Producing Production Quality Software. Lecture 12: Concurrent and Distributed Programming Prof. Arthur P. Goldberg Fall, 2004 Producing Production Quality Software Lecture 12: Concurrent and Distributed Programming Prof. Arthur P. Goldberg Fall, 2004 Topics Models of concurrency Concurrency in Java 2 Why Use Concurrency? Enable

More information

SPIN part 2. Verification with LTL. Jaime Ramos. Departamento de Matemática, Técnico, ULisboa

SPIN part 2. Verification with LTL. Jaime Ramos. Departamento de Matemática, Técnico, ULisboa SPIN part 2 Verification with LTL Jaime Ramos Departamento de Matemática, Técnico, ULisboa Borrowed from slides by David Henriques, Técnico, ULisboa LTL model checking How Spin works Checks non-empty intersection

More information

Softwaretechnik. Lecture 08: Testing and Debugging Overview. Peter Thiemann SS University of Freiburg, Germany

Softwaretechnik. Lecture 08: Testing and Debugging Overview. Peter Thiemann SS University of Freiburg, Germany Softwaretechnik Lecture 08: Testing and Debugging Overview Peter Thiemann University of Freiburg, Germany SS 2012 Literature Essential Reading Why Programs Fail: A Guide to Systematic Debugging, A Zeller

More information

Computer aided verification

Computer aided verification Computer aided verification lecture 10 Model-checking success stories Sławomir Lasota University of Warsaw 1 LITERATURE G. J. Holzman, Mars Code. Commun. ACM 57(2):64-73, 2014. D.L. Detlefs, C.H. Flood,

More information

Softwaretechnik. Lecture 08: Testing and Debugging Overview. Peter Thiemann SS University of Freiburg, Germany

Softwaretechnik. Lecture 08: Testing and Debugging Overview. Peter Thiemann SS University of Freiburg, Germany Softwaretechnik Lecture 08: Testing and Debugging Overview Peter Thiemann University of Freiburg, Germany SS 2012 Literature Essential Reading Why Programs Fail: A Guide to Systematic Debugging, A Zeller

More information

Model Checking Revision: Model Checking for Infinite Systems Revision: Traffic Light Controller (TLC) Revision: 1.12

Model Checking Revision: Model Checking for Infinite Systems Revision: Traffic Light Controller (TLC) Revision: 1.12 Model Checking mc Revision:.2 Model Checking for Infinite Systems mc 2 Revision:.2 check algorithmically temporal / sequential properties fixpoint algorithms with symbolic representations: systems are

More information

Lecture 1 Contracts. 1 A Mysterious Program : Principles of Imperative Computation (Spring 2018) Frank Pfenning

Lecture 1 Contracts. 1 A Mysterious Program : Principles of Imperative Computation (Spring 2018) Frank Pfenning Lecture 1 Contracts 15-122: Principles of Imperative Computation (Spring 2018) Frank Pfenning In these notes we review contracts, which we use to collectively denote function contracts, loop invariants,

More information

Testing. UW CSE 160 Winter 2016

Testing. UW CSE 160 Winter 2016 Testing UW CSE 160 Winter 2016 1 Testing Programming to analyze data is powerful It s useless (or worse!) if the results are not correct Correctness is far more important than speed 2 Famous examples Ariane

More information

Model Checking with Abstract State Matching

Model Checking with Abstract State Matching Model Checking with Abstract State Matching Corina Păsăreanu QSS, NASA Ames Research Center Joint work with Saswat Anand (Georgia Institute of Technology) Radek Pelánek (Masaryk University) Willem Visser

More information

The University of Iowa Fall CS:5810 Formal Methods in Software Engineering. Introduction

The University of Iowa Fall CS:5810 Formal Methods in Software Engineering. Introduction The University of Iowa Fall 2017 CS:5810 Formal Methods in Software Engineering Introduction Copyright 2017, Cesare Tinelli, Pierre-Loïc Garoche, Reiner Hänle, Steven Miller These notes are copyrighted

More information

SCR: A PRACTICAL METHOD FOR REQUIREMENTS SPECIFICATION

SCR: A PRACTICAL METHOD FOR REQUIREMENTS SPECIFICATION SCR: A PRACTICAL METHOD FOR REQUIREMENTS SPECIFICATION Constance Heitmeyer, Naval Research Laboratory, Washington, DC Abstract A controversial issue in the formal methods research community is the degree

More information

Preconditions. CMSC 330: Organization of Programming Languages. Signaling Errors. Dealing with Errors

Preconditions. CMSC 330: Organization of Programming Languages. Signaling Errors. Dealing with Errors Preconditions Functions often have requirements on their inputs // Return maximum element in A[i..j] int findmax(int[] A, int i, int j) {... A is nonempty Aisn't null iand j must be nonnegative iand j

More information

Model Checking with Automata An Overview

Model Checking with Automata An Overview Model Checking with Automata An Overview Vanessa D Carson Control and Dynamical Systems, Caltech Doyle Group Presentation, 05/02/2008 VC 1 Contents Motivation Overview Software Verification Techniques

More information

Having a BLAST with SLAM

Having a BLAST with SLAM Announcements Having a BLAST with SLAM Meetings -, CSCI 7, Fall 00 Moodle problems? Blog problems? Looked at the syllabus on the website? in program analysis Microsoft uses and distributes the Static Driver

More information

Having a BLAST with SLAM

Having a BLAST with SLAM Having a BLAST with SLAM Meeting, CSCI 555, Fall 20 Announcements Homework 0 due Sat Questions? Move Tue office hours to -5pm 2 Software Model Checking via Counterexample Guided Abstraction Refinement

More information

Scenario Graphs Applied to Security (Summary Paper)

Scenario Graphs Applied to Security (Summary Paper) Book Title Book Editors IOS Press, 2003 1 Scenario Graphs Applied to Security (Summary Paper) Jeannette M. Wing Computer Science Department Carnegie Mellon University Pittsburgh, PA 15213 US Abstract.

More information

A Case Study on Model Checking and Deductive Verification Techniques of Safety-Critical Software

A Case Study on Model Checking and Deductive Verification Techniques of Safety-Critical Software A Case Study on Model Checking and Deductive Verification Techniques of Safety-Critical Software Rovedy A. B. e Silva 1,2, Jose M. Parente de Oliveira 2, and Jorge Sousa Pinto 3 1 Aeronautics and Space

More information

Checking General Safety Criteria on UML Statecharts

Checking General Safety Criteria on UML Statecharts Checking General Safety Criteria on UML Statecharts Zsigmond Pap, István Majzik 1 and András Pataricza Dept. of Measurement and Information Systems Budapest University of Technology and Economics H-1521

More information

Lectures 20, 21: Axiomatic Semantics

Lectures 20, 21: Axiomatic Semantics Lectures 20, 21: Axiomatic Semantics Polyvios Pratikakis Computer Science Department, University of Crete Type Systems and Static Analysis Based on slides by George Necula Pratikakis (CSD) Axiomatic Semantics

More information