ACPN2010, Rostock, September 22nd 2010 1 Advanced solution methods for Stochastic Petri Nets Prof.ssa Susanna Donatelli Universita’ di Torino, Italy www.di.unito.it.

Slides:



Advertisements
Similar presentations
Copyright 2000 Cadence Design Systems. Permission is granted to reproduce without modification. Introduction An overview of formal methods for hardware.
Advertisements

Techniques to analyze workflows (design-time)
Representing Boolean Functions for Symbolic Model Checking Supratik Chakraborty IIT Bombay.
CS 267: Automated Verification Lecture 2: Linear vs. Branching time. Temporal Logics: CTL, CTL*. CTL model checking algorithm. Counter-example generation.
CS 267: Automated Verification Lecture 8: Automata Theoretic Model Checking Instructor: Tevfik Bultan.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Budapest University of Technology and EconomicsDagstuhl 2004 Department of Measurement and Information Systems 1 Towards Automated Formal Verification.
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
UPPAAL Introduction Chien-Liang Chen.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Timed Automata.
1 541: Relational Calculus. 2 Relational Calculus  Comes in two flavours: Tuple relational calculus (TRC) and Domain relational calculus (DRC).  Calculus.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
Verification of Hybrid Systems An Assessment of Current Techniques Holly Bowen.
Compatibility between shared variable valuations in timed automaton network model- checking Zhao Jianhua, Zhou Xiuyi, Li Xuandong, Zheng Guoliang Presented.
1 A class of Generalized Stochastic Petri Nets for the performance Evaluation of Mulitprocessor Systems By M. Almone, G. Conte Presented by Yinglei Song.
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.
IE 469 Manufacturing Systems
ECE 720T5 Fall 2012 Cyber-Physical Systems Rodolfo Pellizzoni.
SYMBOLIC MODEL CHECKING: STATES AND BEYOND J.R. Burch E.M. Clarke K.L. McMillan D. L. Dill L. J. Hwang Presented by Rehana Begam.
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture 05.
Petri net modeling of biological networks Claudine Chaouiya.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Banker’s Algorithm Implementation in CPN Tools Michal Žarnay Department of Transportation Networks University of Žilina, Slovakia.
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.
1 Petri Nets H Plan: –Introduce basics of Petri Net models –Define notation and terminology used –Show examples of Petri Net models u Calaway Park model.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Probabilistic Verification of Discrete Event Systems Håkan L. S. Younes.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
1 Formal Engineering of Reliable Software LASER 2004 school Tutorial, Lecture1 Natasha Sharygina Carnegie Mellon University.
1 Relational Algebra and Calculus Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
1 CPN Tools Future work. 2 Overview Language extensions Manual simulation Analysis techniques Editing Other.
Antoine Girard VAL-AMS Project Meeting April 2007 Behavioral Metrics for Simulation-based Circuit Validation.
CSC 8310 Programming Languages Meeting 2 September 2/3, 2014.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Verification technique on SA applications using Incremental Model Checking 컴퓨터학과 신영주.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Pisa, 11/25/2002Susanna Donatelli1 Modelling process and heterogeneous model construction Susanna Donatelli Modelling and evaluation groups.
Some Probability Theory and Computational models A short overview.
CS6133 Software Specification and Verification
Reactive systems – general
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Pisa, 11/25/2002Susanna Donatelli1 Heterogeneous model construction Susanna Donatelli Modelling and evaluation groups of the Dipartimento.
Integrating UML and Petri Nets Problem with Current Software Engineering Methodology Stochastic Petri nets and their useful properties Translating UML.
Generalized stochastic Petri nets (GSPN)
WWV Analyzing a Proxy Cache Server Performance Model with the Probabilistic Model Checker PRISM Tamás Bérczes 1, Gábor Guta.
Modelling by Petri nets
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Validation - Formal verification -
Verification & Validation By: Amir Masoud Gharehbaghi
CSCI1600: Embedded and Real Time Software Lecture 28: Verification I Steven Reiss, Fall 2015.
A new GreatSPN GUI for GSPN editing and CSL TA model checking Tool presentation Elvio G. Amparore UNIVERSITÀ DEGLI STUDI DI TORINO.
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
A Structured Solution Approach for Markov Regenerative Processes Elvio G. Amparore 1, Peter Buchholz 2, Susanna Donatelli 1 1 Dipartimento di Informatica,
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
DEPENDABILITY ANALYSIS (towards Networked Information Systems) Ester Ciancamerla, Michele Minichino ENEA {ciancamerlae, In.
Lecture 9: Query Complexity Tuesday, January 30, 2001.
Formal methods: Lecture
Introduction to Petri Nets (PNs)
Lecture 10: Query Complexity
Logics for Data and Knowledge Representation
An explicit state model checker
‘Crowds’ through a PRISM
Program correctness Model-checking CTL
Presentation transcript:

ACPN2010, Rostock, September 22nd Advanced solution methods for Stochastic Petri Nets Prof.ssa Susanna Donatelli Universita’ di Torino, Italy

2 Context (System, question on system) (Model, question on model) (Model, answer on model) (System, answer on system) abstraction model solution backward interpretation

3 Context System type: discrete event systems Categories of questions: qualitative -- will system reach a deadlock? quantitative -- will system reach a deadlock before time T? stochastic -- will system reach a deadlock before time T with probability >0.9 ? Corresponding classes of models: finite automata (but also Petri Nets, Process Algebras, etc.) timed automata (continuous) time Markov chain ( SPN, GSPN, SWN, Queueing networks, Stochastic Process algebras and stochastic processes in general)

4 Context Typical questions/properties qualitative -- reachability, deadlock, liveness, state/action condition, system evolution (path properties) quantitative -- timed reachability, timed system evolution (timed path properties) stochastic -- reachability in probability We concentrate on stochastic properties for stochastic systems Revisit CSL for Petri Nets Go beyond CSL (not only for nets)

5 Outline Verifying quantitative behaviour: CSL for SPN and SWN definition and model checking Verifying quantitative behaviour: CSL for GSPN Beyond CSL Solving large (G)SPN: symbolic representation and tensor- based techniques Bibliographical references

6 Outline Verifying quantitative behaviour: CSL for SPN and SWN definition and model checking Verifying quantitative behaviour: CSL for GSPN Beyond CSL Solving large (G)SPN: symbolic representation and tensor- based techniques Bibliographical references

7 Recall on SWN Stochastic Well-formed Nets (SWN) are a colored extension of Stochastic Petri Nets Color and arc function definition meant to favour a symmetric specification of the system Symmetries are automatically exploited in state space generation Underlying stochastic process is a CTMC

8 Recall on SWN neutral place colored place color domain D = {d1, d2,..} s_srv is enabled for x = color

9 Recall on SWN Equivalent GSPN when D = {d1, d2}

10 Recall on SWN GSPN state: M(wait_d1)=2 SWN colored state: M(wait) = 2·d1 SWN symbolic state: M(wait)= 2·Z D1, with |Z D1 |=1 M(wait)= 1·Z D1, M(srv) = 1·Z D2, |Z D1 |=1, |Z D2 |=2 equivalence class of all markings with 2 tokens of the same color in place wait two jobs waiting for the same device one job waiting for a device while two jobs are using the other two devices

11 Recall on SWN same cardinality usually much smaller

12 Recall on CSL Model Checking CSL allows the definition of probabilistic verification statements Probability of going from a safe to an unsafe state in less than T time units, while traversing only safe states, is <= In equilibrium, system is in safe states with 0.99 probability Satisfability of the formula on a CTMC requires the solution of a number of "modified" CTMCs

13 CSL syntax State formulae (atomic propositions and boolean expression) and path formulae (timed neXt and timed Until) S <>  (  ) is true in state s if the sum of the steady state probabilities of the  states, computed using s as initial state,  is <> . P <>  (  ) is true in s if the probability of the paths leaving s which satisfy  is <> .

14 Examples of CSL: P  0.01 (true U [10,20] a) Satisfied in states from which the probability of reaching an a-labelled state after between 10 and 20 time units is no more than 0.01 S >0.9 (a) Satisfied in states starting from which the probability of being in an a-labelled state in the long-run is greater than 0.9 Nested formulae: e.g. P  0.1 (a U [10,20] S >0.9 (b  c)) CSL examples

15 CSL Model Checking Ingredients of any CSL model checker: 1. A CTMC or a net model? 2. A way to define atomic properties of states 3. Efficient CSL satisfiability algorithms As produced from an SWN defined at the net level: symbolic, colored, or ordinary? reuse existing tools?

16 CSL & SWN: why Probabilistic verification of systems expressed as SWN validate system behaviour "in probability" natural way to express dependability properties SWN model validation particular important since SWN models can be non trivial to specify limited support is (was) available to validate SWN models

17 CSL & SWN: how Exploit reuse: use existing CSL model checking tools best of the available technology, constantly updated  but does not allow to exploit the peculiarities and properties of nets Keep simple the definition of atomic propositions

18 CSL & SWN: how – an example CSL model checking facility for SWN models by linking GreatSPN to: MRMC, the input model is a CTMC PRISM, the input model is a set of interacting modules specified using a guarded command language from which a CTMC is generated GSPN/SWN tool from the universities of Torino, Piemonte Orientale, Paris-6, Reims CSL tool from the universities of Twente, Aachen, Munich CSL/PCTL tool of the university of Birmingham

19 CSL & SWN: how Language for the definition of atomic properties For SWN this task is not always straightforward, as we may want to refer to neutral, colored and symbolic properties Discuss the issues of the link from GreatSPN SWN solver to to MRMC and PRISM (which solution for which type of property)

20 CSL & SWN: how Marking properties (Type M ):  p  P w p · M (p) ≤ K e.g: M(loc)>1 e.g.: M(loc) + M(wait) < 2 (Type Mcol ):  p  P, c  CD (p) w p,c · M (p)[ c ] ≤ K e.g: M(wait)[d1] >= 2 e.g.: M(wait)[d1] + M(srv)[d2] = 2 (Type Msymb ): Two tokens of the same color in place p and p’? --- not so obvious

21 CSL & SWN: how Transition enabling properties (Type T ): transition t is enabled e.g.: s_srv is enabled, s_srv_d1 is enabled (Type Tcol ): transition t is enabled for a given assignment to the variables of t. e.g.: s_srv is enabled for x=d1 (Type Tsymb): transition t is enabled for x=y

22 Linking GreatSPN to MRMC MRMC works with two input files: the CTMC rate matrix CTMC generated using GreatSPN from the RG/CRG or SRG the list of the atomic propositions valid in each state

23 Atomic properties Labelling states with atomic properties M M(loc)>1 Mcol M(srv)[d1] >=1 Msymb Same color in wait and un_av T s_srv is enabled Tcol s_srv is ena- bled for x=d1 Tsymb t is ena- bled for x=y RG simple---- simple ---- CRG sum over colored tokens simpleOR of many terms (one per color instance simple SRG sum over | Z Di | equivalence may be too coarse Check on Z Di simple equivalence may be too coarse Check on Z Di if x=y is not in the guard of t in symbolic marking M(wait)= 1·Z D1, M(srv) = 1·Z D2, |Z D1 |=1, |Z D2 |=2 (one job waiting for a device while two jobs are using the other two devices) the property is true for only 2 of the 3 states in the equivalence class

24 Atomic properties Solving the red problem: observation transitions M M(loc)>1 Mcol M(srv)[d1] >=1 Msymb Token of same color in srv and un_av T s_srv is enabled Tcol s_srv is ena- bled for x=d1 Tcol t is ena- bled for x=y SRG sum over | Z Di | equivalence may be too coarse Check on Z Di simpleequivalence may be too coarse Check on Z Di if x=y is not in the guard of t

25 Atomic properties M M(loc)>1 Mcol M(srv)[d1] >=1 T s_srv is enabled Tcol s_srv is ena- bled for x=d1 SRG sum over | Z Di | equivalence may be too coarse simple equivalence may be too coarse a token of color d1 in place wait x = d1 test1 s_srv enabled for x=d1 x = d1 test2

26 Atomic properties 2 two tokens of the same color in place wait Observation transitions can be used to define also symbolic (symmetric) properties

27 Linking GreatSPN to MRMC GMC2MRMC.xlab.tra STATES 352 TRANSITIONS … 1 av(1 1 ) loc(8) tloc 2 av(1 1 )loc(7)wait(1 ) s_srv_d1....net GreatSPN.net.ap wait>=4 wait_d1>=4 wait_d2>=4 user APGenerator.lab #DECLARATION t_HS #END wait>=4 wait_d1>= wait>=4 wait_d2>=4... GreatSPN2MRMC

28 Linking GreatSPN to PRISM The PRISM input language is a state-based language State = valuation of a number of bounded variables A set of guarded commands describes the dynamics of the system: from them PRISM derives the CTMC Atomic propositions are implicitly defined, as a CSL formula can include any logical condition on the variables' values

29 Linking GreatSPN to PRISM Two possible ways to connect to PRISM: produce a Prism module directly from the SWN, such that the same CTMC (up to state numbering) is produced; produce a Prism module directly from the CTMC of the SRG/RG  definition of atomic propositions? unfolding the SWN into an SPN, followed by the translation of the SPN into a PRISM module using the already-existing translation for SPN. Current solution does the unfolding, since it is easier and there is already a GSPN->Prism translator.

30 Linking GreatSPN to PRISM For GSPN place names are mapped one-to-one to variable names no particular support is needed to translate M and Mcol atomic propositions T and Tcol propositions have to be restated in terms of markings (variable values). The unfolding algorithm names unfolded places using color names (e.g.: srv_d1)

31 Linking GreatSPN to PRISM GreatSPN.net.def Great2Prism.sm unfolding.net.def const int N = 4; module M … wait_d2 : [0..4]; av_d2 : [0..1] init 1; …. [tloc_0] (loc_ > 0) & (wait_d1 < N) -> : (wait_d1’ = wait_d1 +1) & (loc_’ = loc_ -1); ….. [back_1] (un_av_d2 > 0) & (av_d2 < 1) -> : (av_d2’ = av_d2 +1) & (un_av_d2’ = un_av_d2 -1);

32 Model checking example

33 model checking example (  1 ) : S> 0. 7 (hot spot) the system has a probability > 0.7 of being in an hot-spot state (  2 ) : S≤ 0. 2 (P≥ 0. 9 ( F [ 0, 5 ] hot spot)) probability of being, in equilibrium, in “dangerous” states is at most 0.2. (  3 ) : P≥ 0. 9 ( F [ 0, 5 ] (hot spot & P≥ 0. 7 ( F [ 0, 3 ] ¬ hot spot)) dangerous states good hot spot states