Temporal Logic Model- checking with SPIN COMP6004 Stéphane Lo Presti Part 3: The PROMELA Semantics.

Slides:



Advertisements
Similar presentations
CH4.1 Type Checking Md. Fahim Computer Engineering Department Jamia Millia Islamia (A Central University) New Delhi –
Advertisements

Control Flow Statements: Repetition/Looping
Semantics Static semantics Dynamic semantics attribute grammars
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Intermediate Code Generation
Chapter 6 Type Checking. The compiler should report an error if an operator is applied to an incompatible operand. Type checking can be performed without.
ICE1341 Programming Languages Spring 2005 Lecture #6 Lecture #6 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
UPPAAL Introduction Chien-Liang Chen.
/ PSWLAB P ROMELA Semantics from “THE SPIN MODEL CHECKER” by G. J. Holzmann Presented by Hong,Shin 5 th Oct :021PROMELA Semantics.
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.
Computer Science 101 Overview of Algorithms. Example: Make Pancakes Prepare batter Beat 2 eggs Add 1 tablespoon of brown sugar Add 1 cup of milk Add 2.
The Spin Model Checker Promela Introduction Nguyen Tuan Duc Shogo Sawai.
1 Spin Model Checker Samaneh Navabpour Electrical and Computer Engineering Department University of Waterloo SE-464 Summer 2011.
Comp 205: Comparative Programming Languages Semantics of Imperative Programming Languages denotational semantics operational semantics logical semantics.
© 2011 Carnegie Mellon University SPIN: Part Bug Catching: Automated Program Verification and Testing Sagar Chaki November 2, 2011.
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
Temporal Logic Model- checking with SPIN COMP6004 Stéphane Lo Presti Part 4: Specifications.
Temporal Logic Model- checking with SPIN COMP6004 Stéphane Lo Presti Part 5: Some PROMELA examples.
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
Denotational Semantics Syntax-directed approach, generalization of attribute grammars: –Define context-free abstract syntax –Specify syntactic categories.
Javascript II Expressions and Data Types. 2 JavaScript Review programs executed by the web browser programs embedded in a web page using the script element.
Tutorial 4 Decision Making with Control Structures and Statements Section A - Decision Making JavaScript Tutorial 4 -Decision Making with Control.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Review Topics Test 1. Background Topics Definitions of Artificial Intelligence & Turing Test Physical symbol system hypothesis vs connectionist approaches.
Correctness requirements. Basic Types of Claims Basic assertions End-state labels Progress-state labels Accept-state labels Never claims Trace assertions.
Scientific Computing By: Fatima Hallak To: Dr. Guy Tel-Zur.
Korea Advanced Institute of Science and Technology The Spin Model Checker - Advanced Features Moonzoo Kim CS Dept. KAIST.
Conditional Control Flow By Muhammad Ahsan Qadar SACS Programming Fundamentals Workshop 1.
Java and the Java Virtual Machine 3. The imperative Core Java I of Java Pslab 오민경.
CS6133 Software Specification and Verification
Meet Perl, Part 2 Flow of Control and I/O. Perl Statements Lots of different ways to write similar statements –Can make your code look more like natural.
410/510 1 of 18 Week 5 – Lecture 1 Semantic Analysis Compiler Construction.
Review 1.Lexical Analysis 2.Syntax Analysis 3.Semantic Analysis 4.Code Generation 5.Code Optimization.
PROBLEM SOLVING & ALGORITHMS CHAPTER 5: CONTROL STRUCTURES - SELECTION.
Radu Iosif Introduction to SPIN Radu Iosif
Temporal Logic Model-checking with SPIN
CIS 3301 C# Lesson 3 Control Statements - Selection.
/ 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.
CS412/413 Introduction to Compilers Radu Rugina Lecture 13 : Static Semantics 18 Feb 02.
Restrictions Objectives of the Lecture : To consider the algebraic Restrict operator; To consider the Restrict operator and its comparators in SQL.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Denotational Semantics.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
Today’s Agenda  Quiz 4  Temporal Logic Formal Methods in Software Engineering1.
November COMP60621 Designing for Parallelism Lecture 14 Deadlock + Channels in Promela John Gurd, Graham Riley Centre for Novel Computing School.
CS170 – Week 1 Lecture 3: Foundation Ismail abumuhfouz.
Propositional Calculus: Boolean Functions and Expressions
C-Language Lecture By B.S.S.Tejesh, S.Neeraja
CSE 503 – Software Engineering
COMP60611 Fundamentals of Parallel and Distributed Systems
BY GAWARE S.R. COMPUTER SCI. DEPARTMENT
Prepared By: G.UshaRani B.Pranalini A.S.Lalitha
Expressions and Control Flow in JavaScript
Chapter 19 JavaScript.
Introduction to MATLAB
Microsoft Visual Basic 2005 BASICS
11/10/2018.
The C++ IF Statement Part 2 Copyright © Curt Hill
The Spin Model Checker - Advanced Features
Logical Operations In Matlab.
Three Special Structures – Case, Do While, and Do Until
Computer Science Core Concepts
An Introduction to Linux
Lecture 5 Binary Operation Boolean Logic. Binary Operations Addition Subtraction Multiplication Division.
Introduction to Computer Science
The Spin Model Checker - Advanced Features
Flow of Control Flow of control is the order in which a program performs actions. Up to this point, the order has been sequential. A branching statement.
Terminology and Symbols
Presentation transcript:

Temporal Logic Model- checking with SPIN COMP6004 Stéphane Lo Presti Part 3: The PROMELA Semantics

Last Lecture PROMELA Syntax  Process  Variables  Channels  Statements/Conditions

Semantics of PROMELA Operational model based on: Processes (Labelled transition Systems) Variables Channels Semantics engine

What is a semantics? FOLDOC: The meaning of a string in some language, as opposed to syntax which describes how symbols may be combined independent of their meaning. SPIN semantics is operational (i.e. execution) and not denotational (i.e. mathematical)

Semantics engine Derive from the PROMELA model a labelled transition system (LTS) “Executes” step by step the model  Check the executability of statements  select an executable statement  Apply the statement effects Until no statements (either no processes, or end-state)

Variables Defined by  Name  Scope  Domain  Initial value  Current value

Channels Defined by  ID  Number of slots  Contents, i.e. ordered set of messages (ordered set of variables)

Processes Defined by  ID  Local variables  Local states  Initial state  Current state  Transition relation

LTS (1) Transition  ID  Source and target local states  Boolean condition  Effect function  (special: unless statement, synchronous communication)

LTS (2) System state  Global variables  Local variables  Set of channels  Execution variables Exclusive Handshake Timeout Else Stutter

LTS (3) Initial system state  Processes in their initial state  Global variables at their initial values  Channels with empty contents  Execution variables are zero/ false

Overview of the SPIN algorithm (1) while ((E = executable(s)) != {}) {for some {p,t} from E {s’ = apply(t.effect,s) if (handshake == 0) {p.curstate = t.target s=s’ } else { E’= executable(s’) for some {p’,t’} from E’ {p.curstate = t.target s = apply(t’.effect,s’) p’.curstate = t’.target} handshake = 0 }}} while (stutter) {s = s }

Overview of the SPIN algorithm (2) Set executable(State s) { new Set E = {}; new Set e; timeout = False AllProcs: for each active process p {if (exclusive == 0 or exclusive == p.pid) {for u from high to low { e = {}; else = False OneProc:for each transition t in p.trans {if (t.source == p.curstate and t.prty == u and (handshake == 0 or handshake == t.rv) and eval(t.cond) == True) { add {p,t} to set e} } if (e != {}){break add all elements of e to E} else if (else == False) {else = True goto OneProc} } } } if (E == {} and exclusive != 0){exclusive = True goto AllProcs} if (E == {} and timeout == False){timeout = True goto AllProcs} return E}