A Usable Reachability Analyser Victor Khomenko Newcastle University.

Slides:



Advertisements
Similar presentations
The Quest for Correctness Joseph Sifakis VERIMAG Laboratory 2nd Sogeti Testing Academy April 29th 2009.
Advertisements

Vasileios Germanos 1, Stefan Haar 2, Victor Khomenko 1, and Stefan Schwoon 2 1 School of Computing Science, Newcastle University, UK 2 INRIA & LSV (ENS.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Partial Order Reduction: Main Idea
Introduction to Petri Nets Hugo Andrés López
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
1 MODULE name (parameters) “Ontology” “Program” “Properties” The NuSMV language A module can contain modules Top level: parameters less module Lower level.
UPPAAL Introduction Chien-Liang Chen.
Timed Automata.
1 BalsaOpt a tool for Balsa Synthesis Francisco Fernández-Nogueira, UPC (Spain) Josep Carmona, UPC (Spain)
1 Advanced Digital Design Synthesis of Control Circuits by A. Steininger and J. Lechner Vienna University of Technology.
Efficient Reachability Analysis for Verification of Asynchronous Systems Nishant Sinha.
Merged Processes of Petri nets Victor Khomenko Joint work with Alex Kondratyev, Maciej Koutny and Walter Vogler.
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.
1 Concurrency Specification. 2 Outline 4 Issues in concurrent systems 4 Programming language support for concurrency 4 Concurrency analysis - A specification.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Hazard-free logic synthesis and technology mapping I Jordi Cortadella Michael Kishinevsky Alex Kondratyev Luciano Lavagno Alex Yakovlev Univ. Politècnica.
Hardware and Petri nets Synthesis of asynchronous circuits from Signal Transition Graphs.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Logic Decomposition of Asynchronous Circuits Using STG Unfoldings Victor Khomenko School of Computing Science, Newcastle University, UK.
10. Petri Nets Prof. O. Nierstrasz. Roadmap  Definition: —places, transitions, inputs, outputs —firing enabled transitions  Modelling: —concurrency.
Logic Synthesis for Asynchronous Circuits Based on Petri Net Unfoldings and Incremental SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University.
Detecting State Coding Conflicts in STGs Using Integer Programming Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne.
Hardware and Petri nets: application to asynchronous circuit design Jordi CortadellaUniversitat Politècnica de Catalunya, Spain Michael KishinevskyIntel.
Introduction to asynchronous circuit design: specification and synthesis Part III: Advanced topics on synthesis of control circuits from STGs.
1 Logic design of asynchronous circuits Part II: Logic synthesis from concurrent specifications.
Introduction to asynchronous circuit design: specification and synthesis Part II: Synthesis of control circuits from STGs.
Combining Decomposition and Unfolding for STG Synthesis (application paper) Victor Khomenko 1 and Mark Schaefer 2 1 School of Computing Science, Newcastle.
CP — Concurrent Programming 12. Petri Nets Prof. O. Nierstrasz Wintersemester 2005 / 2006.
1 Logic synthesis from concurrent specifications Jordi Cortadella Universitat Politecnica de Catalunya Barcelona, Spain In collaboration with M. Kishinevsky,
Asynchronous Interface Specification, Analysis and Synthesis M. Kishinevsky Intel Corporation J. Cortadella Technical University of Catalonia.
12/07/2007Jiacun Wang1 SE-561 Math Foundations Petri Nets - II Dr. Jiacun Wang Department of Software Engineering Monmouth University.
Visualisation and Resolution of Coding Conflicts in Asynchronous Circuit Design A. Madalinski, V. Khomenko, A. Bystrov and A. Yakovlev University of Newcastle.
Resolution of Encoding Conflicts by Signal Insertion and Concurrency Reduction based on STG Unfoldings V. Khomenko, A. Madalinski and A. Yakovlev University.
Behaviour-Preserving Transition Insertions in Unfolding Prefixes
STG-based synthesis and Petrify J. Cortadella (Univ. Politècnica Catalunya) Mike Kishinevsky (Intel Corporation) Alex Kondratyev (University of Aizu) Luciano.
Models of Computation for Embedded System Design Alvise Bonivento.
1 State Encoding of Large Asynchronous Controllers Josep Carmona and Jordi Cortadella Universitat Politècnica de Catalunya Barcelona, Spain.
UFO’07 26 June 2007 Siedlce 1 Use of Partial Orders for Analysis and Synthesis of Asynchronous Circuits Alex Yakovlev School of EECE University of Newcastle.
A New Type of Behaviour- Preserving Transition Insertions in Unfolding Prefixes Victor Khomenko.
Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne.
1 A Case for Using Signal Transition Graphs for Analysing and Refining Genetic Networks Richard Banks, Victor Khomenko and Jason Steggles School of Computing.
Automatic synthesis and verification of asynchronous interface controllers Jordi CortadellaUniversitat Politècnica de Catalunya, Spain Michael KishinevskyIntel.
Derivation of Monotonic Covers for Standard C Implementation Using STG Unfoldings Victor Khomenko.
Asynchronous Circuit Verification and Synthesis with Petri Nets J. Cortadella Universitat Politècnica de Catalunya, Barcelona Thanks to: Michael Kishinevsky.
Real-Time System Requirements & Design Specs Shaw - Chapters 3 & 4 Homework #2: 3.3.1, 3.4.1, Add Error states to Fig 4.1 Lecture 4/17.
Unit Testing CS 414 – Software Engineering I Don Bagert Rose-Hulman Institute of Technology January 16, 2003.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
WSMX Execution Semantics Executable Software Specification Eyal Oren DERI
CY2003 Computer Systems Lecture 7 Petri net. © LJMU, 2004CY2003- Week 72 Overview Petri net –concepts –Petri net representation –Firing a transition –Marks.
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
Modelling by Petri nets
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
Modelling and Analysis of Time-related Properties in Web Service Compositions Raman KazhamiakinParitosh K. PandyaMarco Pistore
Model Checking Lecture 1. Model checking, narrowly interpreted: Decision procedures for checking if a given Kripke structure is a model for a given formula.
Program Correctness. The designer of a distributed system has the responsibility of certifying the correctness of the system before users start using.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
From Natural Language to LTL: Difficulties Capturing Natural Language Specification in Formal Languages for Automatic Analysis Elsa L Gunter NJIT.
Model Checking Lecture 1: Specification Tom Henzinger.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Diagnostic Information for Control-Flow Analysis of Workflow Graphs (aka Free-Choice Workflow Nets) Cédric Favre(1,2), Hagen Völzer(1), Peter Müller(2)
Model Checking Lecture 2. Model-Checking Problem I |= S System modelSystem property.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
Model Checking Lecture 2 Tom Henzinger. Model-Checking Problem I |= S System modelSystem property.
Complexity of Compositional Model Checking of Computation Tree Logic on Simple Structures Krishnendu Chatterjee Pallab Dasgupta P.P. Chakrabarti IWDC 2004,
Victor Khomenko Newcastle University
Asynchronous Interface Specification, Analysis and Synthesis
Concurrency Specification
Presentation transcript:

A Usable Reachability Analyser Victor Khomenko Newcastle University

2 Reachability analysis Problem statement: check if there is a reachable state s satisfying a given predicate R(s) Usually R specifies some undesirable situation, e.g. a deadlock, violation of mutual exclusion, violation of an assertion If the system is a safe Petri net then R is a Boolean expression over the elementary predicates corresponding to the places, e.g.: p 1 p 2 + p 1 p 3 + p 2 p 3

3 How to specify properties? Manual specification is tedious and error- prone Automatic generation of formulae can be done only for a fixed set of standard properties; hence custom properties cannot be checked, even if they are just minor variations of standard properties Users are often forced to implement generators for their custom properties (simple in theory, hard work in practice)

4 Example: Dining Philosophers T 11 P 15 T1T1 P3P3 P5P5 P2P2 T2T2 P1P1 T5T5 P6P6 T4T4 P4P4 P7P7 P8P8 P9P9 P 11 P 10 P 13 P 14 P 12 T9T9 T7T7 T 10 T6T6 T8T8 T3T3 T 12 P 16 p 1 (p 2 + p 7 )(p 3 + p 8 )(p 4 + p 5 ) p 6 p 9 (p 7 + p 10 )(p 8 + p 9 )(p 12 + p 13 ) p 14 p 1 p 9 (p 15 + p 16 )

5 How to specify properties? In this case can reduce to standard deadlock checking: In general, such reductions may be difficult or not possible It is a bad idea to make the user to modify the model or invent tricks P 15 P 16

6 Proposed solution Language Reach for specifying reachability properties: custom properties can be easily and concisely specified the model does not have to be modified in any way, in particular the model does not have to be translated into an input language of some model checker almost any reachability analyser can be used as the back-end

7 Example: deadlock property Mathematical definition: Reach specification: forall t in TRANSITIONS { exists p in pre t { ~$p } } or simply forall t in TRANSITIONS { } taking care of proper termination: forall t in TRANSITIONS { } & (~$P"p15" | ~$P"p16")

8 Reachability analysis flow

9 Case studies: asynchronous circuits Asynchronous circuits are circuits without clocks Very attractive: the traditional synchronous (clocked) designs lack flexibility to cope with contemporary microelectronics challenges Notoriously difficult to design correctly Often specified using Signal Transition Graphs (STGs) – a class of labelled Petri nets

10 Example: VME Bus Controller lds-d-ldtack-ldtack+ dsr-dtack+d+ dtack-dsr+lds+ Device VME Bus Controller lds ldtack d Data Transceiver Bus dsr dtack

11 Case studies: Consistency In each possible execution, the transitions representing the rising and falling edges of each signal must be correctly alternated between, always starting from the same edge (either rising or falling) exists s in SIGNALS { let Ts = tran s { $s & exists t in Ts s.t. is_plus t } | ~$s & exists t in Ts s.t. is_minus t } } }

12 Case studies: Output persistency A local signal (output or internal) should not be disabled by any other transition x+a+ x+a+ x+ a+ x+ OP violationok y+x+b+a+ OP violationok x+a+

13 Case studies: Output persistency exists t1 in TRANSITIONS s.t. sig(t1) in LOCAL & exists t2 in TRANSITIONS s.t. sig(t2)!=sig(t1) & |pre(t1)*(pre(t2)\post(t2))|!=0 & forall t3 in tran(sig(t1))\{t1} s.t. |pre(t3)*(pre(t2)\post(t2))|=0 { exists p in pre(t3)\post(t2) { ~$p } } } } Intuitively, we are looking for a marking where t1 is disabled by t2, and after t2 fires, no transition with the same signal as t1 is enabled

14 Case studies: CSC States with the same encoding should enable the same local signals dtack-dsr+ dtack-dsr+ dtack-dsr ldtack lds lds+ ldtack+ d+ dtack+dsr- d M’’M’

15 Case studies: CSC Generalised reachability property: check if there are reachable states s 1,…,s k satisfying a given predicate R(s 1,…,s k ) forall s in SIGNALS { $s $$s } & exists s in LOCAL { }

16 Case studies: arbiters Arbiter r1r1 …… rnrn g1g1 gngn g1+g1+r1+r1+ rn+rn+ r1-r1-g1-g1- gn+gn+rn-rn-gn-gn- … Traditional protocol Early protocol g1+g1+r1+r1+ rn+rn+ r1-r1-g1-g1- gn+gn+rn-rn-gn-gn- …

17 Case studies: deadlock in arbiters The rising request transitions are not weakly fair, i.e. any state (except the initial one) enabling only such transitions is a deadlock The initial state has to be treated in a special way A minor variation of a standard property that renders standard deadlock checkers almost useless let requests = {T"ra+", T"rb+", T"rc+"} { forall t in TRANSITIONS\requests { } } & exists p in PLACES { $p ^ is_init p } let requests = TT "r[a-z]\\++\\(/[0-9]\\+\\)\\?" {

18 Case studies: mutual exclusion Mutual exclusion of signals rather than places let a = $S"ga", b = $S"gb", c = $S"gc" { a & b | b & c | a & c } Alternatively: threshold[2]($S"ga", $S"gb", $S"gc") With a regular expression: let grants = SS "g[a-z]\\+" { threshold[2] g in grants { $g } }

19 Case studies: mutual exclusion Traditional mutual exclusion does not hold for the early protocol threshold[2]($S"ra" & $S"ga", $S"rb" & $S"gb", $S"rc"&$S"gc") With a regular expression: let req = SS "r[a-z]\\+" { threshold[2] r in req { $r & $S("g" + (name r)[1..]) } }

20 Conclusion A solution to the problem of generating formulae expressing custom reachability properties has been proposed The usefulness of this method is demonstrated on several case studies The developed MPSAT tool is currently being used as the reachability analysis engine within the DesiJ and Workcraft tools

21 Future work Extension to other formalisms is straightforward (general Petri nets, coloured Petri nets, products of automata, digital circuits, etc.) Extension to other property classes is straightforward (e.g. add LTL or CTL modalities) Share common subterms during expansion Add more powerful constructs, such as recursive definitions and rewriting rules