Scientific Computing By: Fatima Hallak To: Dr. Guy Tel-Zur.

Slides:



Advertisements
Similar presentations
The SPIN System. What is SPIN? Model-checker. Based on automata theory. Allows LTL or automata specification Efficient (on-the-fly model checking, partial.
Advertisements

CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
CS 290C: Formal Models for Web Software Lecture 3: Verification of Navigation Models with the Spin Model Checker Instructor: Tevfik Bultan.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Operating Systems & Concurrent Programming Distributed Operating Systems & Algorithms Lecturer: Xu Qiwen Textbook: Randy Chow Theodore Johnson.
UPPAAL Introduction Chien-Liang Chen.
Timed Automata.
Formal verification in SPIN Karthikeyan Bhargavan, Davor Obradovic CIS573, Fall 1999.
/ PSWLAB P ROMELA Semantics from “THE SPIN MODEL CHECKER” by G. J. Holzmann Presented by Hong,Shin 5 th Oct :021PROMELA Semantics.
© 2011 Carnegie Mellon University SPIN: Part /614 Bug Catching: Automated Program Verification Sagar Chaki April 21, 2014.
PSWLAB S PIN Search Algorithm from “THE SPIN MODEL CHECKER” by G Holzmann Presented by Hong,Shin 9 th Nov SPIN Search Algorithm.
1 Temporal Claims A temporal claim is defined in Promela by the syntax: never { … body … } never is a keyword, like proctype. The body is the same as for.
The Spin Model Checker Promela Introduction Nguyen Tuan Duc Shogo Sawai.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
ISBN Chapter 3 Describing Syntax and Semantics.
1 Spin Model Checker Samaneh Navabpour Electrical and Computer Engineering Department University of Waterloo SE-464 Summer 2011.
Spin Tutorial (some verification options). Assertion is always executable and has no other effect on the state of the system than to change the local.
© 2011 Carnegie Mellon University SPIN: Part Bug Catching: Automated Program Verification and Testing Sagar Chaki November 2, 2011.
© 2011 Carnegie Mellon University SPIN: Part Bug Catching: Automated Program Verification and Testing Sagar Chaki October 31, 2011.
CSE 555 Protocol Engineering Dr. Mohammed H. Sqalli Computer Engineering Department King Fahd University of Petroleum & Minerals Credits: Dr. Abdul Waheed.
Temporal Logic Model- checking with SPIN COMP6004 Stéphane Lo Presti Part 4: Specifications.
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
1 Carnegie Mellon UniversitySPINFlavio Lerda SPIN An explicit state model checker.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Chapter 11: Distributed Processing Parallel programming Principles of parallel programming languages Concurrent execution –Programming constructs –Guarded.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
Describing Syntax and Semantics
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
CS 290C: Formal Models for Web Software Lecture 4: Model Checking Navigation Models with Spin Instructor: Tevfik Bultan.
The Model Checker SPIN Written by Gerard J. Holzmann Presented by Chris Jensen.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Using Model-Checking to Debug Device Firmware Sanjeev Kumar Microprocessor Research Labs, Intel Kai Li Princeton University.
Correctness requirements. Basic Types of Claims Basic assertions End-state labels Progress-state labels Accept-state labels Never claims Trace assertions.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
CS6133 Software Specification and Verification
Dynamic Analysis of Multithreaded Java Programs Dr. Abhik Roychoudhury National University of Singapore.
Sept COMP60611 Fundamentals of Parallel and Distributed Systems Lecture 15 More Advanced Program Properties: Temporal logic and jSpin John Gurd,
Verifying Autonomous Planning Systems Even the best laid plans need to be verified Prepared for the 2005 Software Assurance Symposium (SAS) DS1 MSL EO1.
MODEL CHECKING WITH SPIN MODELING AND VERIFICATION WITH SPIN ANDREA ORLANDINI – ISTC (CNR) TexPoint fonts used in EMF. Read the TexPoint manual before.
1 M. Tudruj, J. Borkowski, D. Kopanski Inter-Application Control Through Global States Monitoring On a Grid Polish-Japanese Institute of Information Technology,
1 Qualitative Reasoning of Distributed Object Design Nima Kaveh & Wolfgang Emmerich Software Systems Engineering Dept. Computer Science University College.
Fault-Tolerant Parallel and Distributed Computing for Software Engineering Undergraduates Ali Ebnenasir and Jean Mayo {aebnenas, Department.
1 Threads, SMP, and Microkernels Chapter 4. 2 Process Resource ownership: process includes a virtual address space to hold the process image (fig 3.16)
1 CSEP590 – Model Checking and Automated Verification Lecture outline for August 6, 2003.
Temporal Logic Model-checking with SPIN
HACNet Simulation-based Validation of Security Protocols Vinay Venkataraghavan Advisors: S.Nair, P.-M. Seidel HACNet Lab Computer Science and Engineering.
Modelling Reactive Systems 4 Professor Muffy Calder Dept. of Computing Science University of Glasgow
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
/ PSWLAB S PIN Search Optimization from “THE SPIN MODEL CHECKER” by G. Holzmann Presented by Hong,Shin 23 th Nov SPIN Search.
Lecture 4 Introduction to Promela. Promela and Spin Promela - process meta language G. Holzmann, Bell Labs (Lucent) C-like language + concurrency dyamic.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
September 1999Compaq Computer CorporationSlide 1 of 16 Verification of cache-coherence protocols with TLA+ Homayoon Akhiani, Damien Doligez, Paul Harter,
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
Agenda  Quick Review  Finish Introduction  Java Threads.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Copyright 1999 G.v. Bochmann ELG 7186C ch.1 1 Course Notes ELG 7186C Formal Methods for the Development of Real-Time System Applications Gregor v. Bochmann.
Chapter 4: Threads Modified by Dr. Neerja Mhaskar for CS 3SH3.
Introduction to threads
Advanced Computer Systems
Formal verification in SPIN
Chapter 4: Threads.
Multithreaded Programming
An explicit state model checker
A Refinement Calculus for Promela
CISC 7120X Programming Languages and Compilers
COMP60621 Designing for Parallelism
Presentation transcript:

Scientific Computing By: Fatima Hallak To: Dr. Guy Tel-Zur

SPIN Spin home pageSpin home page Spin targets efficient software verification. Supports a high level language called PROMELA (a PROcess MEta LAnguage). ًWritten in ANSI standard C Portable across all versions of Unix, Linux, cygwin, Plan9, Inferno, Solaris, Mac, and Windows

SPIN V 4 provides direct support for the use of embedded C code as part of model specifications. To directly verify implementation level software specifications, as a driver and as a logic engine to verify high level temporal properties. V 5 provides direct support for the use of multi-core computers for model checking runs -- supporting both safety and liveness verifications. Driver for swarm verification (a new form of swarm computing), which can make optimal use of large numbers of available compute cores to leverage parallelism and search diversification techniques.swarm verification

SPIN’s Functionality Used to trace logical design errors in distributed systems design, such as operating systems, data communications protocols, switching systems, concurrent algorithms, railway signaling protocols, etc. Reports on deadlocks, unspecified receptions, flags incompleteness, race conditions, and unwarranted assumptions about the relative speeds of processes

SPIN Supports Dynamically growing and shrinking numbers of processes, using a rubber state vector technique. Both rendezvous and buffered message passing, and communication through shared memory. Mixed systems, using both synchronous and asynchronous communications. Message channel identifiers for both rendezvous and buffered channels, can be passed from one process to another in messages.

Spin can be used in four main modes 1. Simulator, allowing for rapid prototyping with a random, guided, or interactive simulations 2. Exhaustive verifier, capable of rigorously proving the validity of user specified correctness requirements (using partial order reduction theory to optimize the search) either depth-first or breadth-first search. 3. Proof approximation system that can validate even very large system models with maximal coverage of the state space. 4. a driver for swarm verification which can make optimal use of large numbers of available compute cores to leverage parallelism and search diversification techniques, which increases the chance of locating defects in very large verification models.swarm verification

Swarm 3.1 – Verification Script generator for SPIN Syntax: swarm [config_file] [option] * Script that performs many small verification jobs in parallel that can increase the problem coverage for very large verification problems by about an order of magnitude compared to standard bitstate verification runs. It is meant to be used on models for which standard verification with exhaustive, bitstate, hash- compaction etc. either runs out of memory, or takes more time than is available (e.g., days or weeks).

swarm3.1.tar Swarm uses parallelism and search diversification to reach its objectives.The user can use a configuration file to define: how many processing cores are available how much memory can be used how much time is maximally available other optional parameter settings. Based on this information, swarm generates the script that runs as many independent jobs as possible in parallel, without exceeding any of the user-defined constraints. Swarm can run jobs using local CPU cores or remote machines in a grid network. Swarm 3.1 is a reimplementation of the algorithm, making more extensive use of search randomization techniques, and taking advantage of some new features implemented for this purpose in Spin Version 5.2 and up

Nondeterministic Finite Automata (NDFA) problem Nondeterminism is a central concept in CS that appears frequently in applications: grammars of programming languages, algorithms and the interleaving model of concurrency. The SPIN semantics is existential (a string is accepted if there exists a computation that terminates in an accepting state after reading the entire string) A primer on Model checking by Moti Ben-Ari

NDFA program Programmed using the guarded if-command for nondeterministic trasitions. For example: {(q5, a, q7), (q5, a, q3), (q5, b, q5)}. q5: if :: input == ‘a’ -> input = next-symbol; goto q7 :: input == ‘a’ -> input = next-symbol; goto q3 :: input == ‘b’ -> input = next-symbol; goto q5 fi Next, add the alternative: :: end-of-input -> assert(false)

SPIN modes in NDFA Random simulation is the execution of the NDFA with arbitrary resolution of nondeterministic transitions. Interactive simulation is the execution of an NDFA with an oracle ensuring that an accepting computation is found Verification represents the metalevel determination if there exists an accepting computation or not.

Other examples

The Semantics of LTL A ↔ B (Equivalent) A → B (Implies) A ν B (or) A Λ B (and) ¬A (Not) BA TTTTFTT FFTFFFT FTTFTTF TTFFTFF

The Semantics of LTL bool wantP = false, wantQ= false; Active proctype P() { do :: wantP = true; do :: wantQ -> wantP = false; wantP = true ::else -> break od; wantP = false od } Active proctype Q() { do :: wantQ = true; do :: wantP -> wantQ = false; wantQ = true ::else -> break od; wantQ = false od }