Formal Methods in Software Engineering

Size: px
Start display at page:

Download "Formal Methods in Software Engineering"

Transcription

1 Formal Methods in Software Engineering Modeling Prof. Dr. Joel Greenyer October 21, 2014

2 Organizational Issues Tutorial dates: I will offer two tutorial dates Tuesdays 15:00-16:00 in A310 (before the lecture, same room) Wednesdays 9:00-10:00 in G325 best compromise in student/room availability I hope everyone can make it to one of the tutorials! First tutorial is tomorrow at 9:00 in room G325 2

3 Organizational Issues What we will do in the tutorials: students (you) present results of assignments and mini-projects we discuss assignments you can ask questions about mini-projects and work on them Submit presentations if you want to present your results, please prepare a few slides MS Powerpoint, Libreoffice Im or PDF and them to me prior to the tutorial greenyer@inf.uni-hannover.de, subject prefix [FMSE] example: Subject [FMSE] presentation of project results Hi, I would like to present the results of our project in the tutorial on Wednesday... 3

4 Organizational Issues Google community: now 43 members anyone did not join? 4

5 in the last lecture... A typical Software/Systems Development Process... informal specification: informal unambiguous? requirements consistent? informal or integration/ semi-formal specification system tests use andnot what stakeholder maintenance =? wanted. Violates critical requirements, dire consequences design All requirements considered? Design correct? public void run(){...; } implementation unit tests Testing? Based on informal specification. 5

6 Model Checking in the last lecture... modify model (usually the error is here) Model false + counter example (how the specification can be violated) Model Checking true or modify specification (may also be wrong) Specification 6

7 in the last lecture... Model Checking in the development process GQ6 informal specification formalize transform assert(...); formal specification specification for MC tool check []!a b; []<> a; Model Checker (MC) chan ts2c =... transform Model for MC tool modify design or specification detail design or generate code create design design write/ generate code public void run(){...; } code 7

8 Today: Modeling the behavior of systems Which modeling languages do you know for modeling the behavior of software or software-controlled systems? 8

9 Different kinds of systems/behavior transformational, interactive, reactive Transformational systems transform input values to output values Inputs are given at the start of the computation Output are returned when computation terminates gcd 7 computing greatest common divisor, solving traveling salesman problem,... 9

10 Different kinds of systems/behavior transformational, interactive, reactive Interactive systems The system interacts with its environment (may include human users) The system asks for new input during computation Usually, computation terminates at some point but may also, conceptually, run forever Q z.b. online shop, flight booking application, etc. 10

11 Different kinds of systems/behavior transformational, interactive, reactive Reactive systems The system interacts with its environment (may include human users) The system must react to input, external events (instead of asking for it) Often, the computation has no definitive end system may, conceptually, run forever Q control software for planes, cars, robots, satellites, trains, power plants, ATMs, telecommunication systems, etc. 11

12 Discrete, Continuous, Hybrid Behavior Models Discrete behavior Behavior interpreted as sequence of events and states states remain unchanged between events Continuous behavior The state of the system changes continuously over time Hybrid behavior continuous and discrete aspects are relevant in Cyber-Physical Systems 12

13 Timed Behavior For some systems, considering the passage of time is important Events must/must not occur in certain time bounds Time scales can be different flight booking: check in 24h before start airbag must open within milliseconds & return book after + four weeks Bib time-critical: train moves, barriers require some time to close 13

14 Stochastic Behavior In some systems, some events are known to occur with certain probabilities Examples It starts raining Communication channel breaks down Data package is lost Behavior of users Probability of virus infection probability that a computer will be infected by a computer virus 14

15 Data-intensiveness The behavior of some system can be modeled with simple events coffee machine: Insert Coin, Choose Coffee, Pour Coffee, In other systems, more complex concepts must be modeled with more complex data structures flight data in flight booking application Events are data intensive e.g. Tony Shark, Passport-Nr. XY, books Flug AF5342 on Dec. 28th from New York to Paris... buche(...) Q 15

16 Labeled Transition Systems (LTSs) One very basic modeling language for modeling reactive systems is Labeled Transition Systems (LTSs) LTSs are a simple form of automata consisting essentially of states and transitions transitions are labeled by actions suited for modeling concurrent systems systems with several modules/processes that are executed concurrently and communicate with each other 16

17 Labeled Transition Systems (LTSs) A (Labeled) Transition System is a tuple TS= (S, Σ, T, I) S is a set of states I S is the set of initial states Σ is an alphabet, an element in Σ is called a symbol (a symbol is also called an input, event, or action) T S Σ S is a transition relation an element of T is a transition A TS is called finite if S and Σ are finite off low hold high S = {off, low, high} I = {off} Σ = {, hold} T = {(off,, low), (low, hold, high), (low,, off) (high,, off)} model of a flashlight 17

18 Path in a Labeled Transition System A path of a labeled transition system is a sequence of transitions (s i, a i,s' i ) that follow each other, i.e., i: s' i = s i+1 (off,, low), (low, hold, high), (high,, off),... off low hold high 18

19 Word / language accepted by an LTS Similar to finite automata, we can define that a word / language is accepted by an LTS An LTS TS= (S, Σ, T, I) accepts word w = e 0, e 1, e 2, over the alphabet Σ if there exists a sequence of states s 0, s 1, in S with s 0 I (s i, e i, s i+1 ) T for all i = 1,.. The set of all words accepted by an LTS TS is called the language accepted by TS, written L(TS) L(A) Σ ω words have infinite length if there are no deadlocks L(A) Σ* Σ ω words can be finite if there are deadlocks 19

20 Parallelism and Communication Often systems consist of multiple communicating components that run concurrently parallel software threads system is physically distributed, e.g. cars, trains, phones, We want to define a composition operator such that we can talk about TS = TS 1 TS n Different kinds of concepts for modeling parallelism and communication exist what kind of parallelism: parallel execution, interleaving handshaking communication via shared variables messages and channels (synchronous and asynchronous) 20

21 Parallel Execution Processes execute independently Transitions may take place simultaneously TrafficLight A red Parallel execution of TrafficLight A and TrafficLight B turnred green turngreen red A, red B --, turngreen (other transition labels skipped for brevity) TrafficLight B red green A, red B red A, green B turnred turngreen green A, green B green 21

22 Interleaving No simultaneous firing of transitions (partly independent) Like parallel threads scheduled on one processor Interleaving of TrafficLight A and TrafficLight B, TrafficLight A red we write TrafficLight A TrafficLight B turnred green turngreen red A, red B --, turngreen (other transition labels skipped for brevity) TrafficLight B red green A, red B red A, green B turnred turngreen green A, green B green 22

23 Parallel Composition via Handshaking Processes synchronize on certain common events transitions with these events are executed simultaneously only if both processes are ready execute a common event the other transitions are interleaved Light hold off low high Light {, hold} Switch Switch rel release pr hold off, rel release low, pr hold release high, pr release off, pr low, rel high, rel 23

24 Handshaking Let TS 1 = (S 1, Σ 1, T 1, I 1 ) and TS 2 = (S 2, Σ 2, T 2, I 2 ) be two transition systems and H Σ 1 Σ 2 then TS 1 H TS 2 is defined as follows TS 1 H TS 2 = (S 1 S 2, Σ 1 Σ 2, T, I 1 I 2 ) where T is defined by the following rules if a H and (s 1, a, s' 1 ) T 1 and (s 2, a, s' 2 ) T then (<s 1, s 2 >, a, <s' 1, s' 2 >) T if a if a 2 Σ 1 \ H and (s 1, a, s' 1 ) T 1 then (<s 1, s 2 >, a, <s' 1, s 2 >) T Σ 2 \ H and (s 2, a, s' 2 ) T 2 then (<s 1, s 2 >, a, <s 1, s' 2 >) T If H = Σ 1 Σ 2 we just write TS 1 TS 2 instead of TS 1 H TS 2 If H = {} then TS 1 H TS 2 is equivalent to TS 1 TS 2 Handshaking is also called synchronous message passing 24

25 Reachable States Note: Only some states in S 1 S 2 may be reachable Light off low hold high Switch Light Switch rel release pr off, rel low, pr high, pr hold release release release off, pr low, rel hold high, rel 25

26 Variables, Conditions, and Assignments When modeling real-life systems, it is often convenient to consider variables consider guarded transitions and side-effects of transitions on variables (assignments) Consider the following extended LTS. (We introduce these concepts in a by-example fashion.) (we can also represent sequential programs this way) var: int[0..3] b; // brightness variable declaration guard condition off on hold [b<3] / b++ hold [b=3] / b=0 assignment 26

27 Unfolding An LTS with variables, guard conditions, and assignments can be transformed into a regular LTS via unfolding var: int[0..3] b; // brightness off on hold [b<3] / b++ hold [b=3] / b=0 unfolded LTS without variables, guards and assignments: ( off b=2 is just the name of a state---not a variable!---to illustrate the correspondence) off off b=0 off b=1 off b=2 off b=3 on b=0 on b=1 on b=2 on b=3 hold hold hold hold 27

28 Communication via Shared Variables Example: Printer Manager PM A end /p++ idle wait req var: int p = 1 begin [p>0] / p-- end A wait A, idle B, p=1 req A idle A, idle B, p=1 PM B PM B req B idle A, wait B, p=1 end B print begin A req B req A begin B PM B end /p++ idle req wait begin [p>0] / p-- print A, idle B, p=0 req B end B begin A print A, wait B, p=0 wait A, wait B, p=1 end A wait A, print B, p=0 begin B idle A, print B, p=0 req A print 28

29 The LTSA Tool with Animator (for Simulation) 29

30 Labelled Transition System Analyser (LTSA) Modeling and verification tool for concurrent systems Modeling with Finite State Processes (FSP) they can be transformed into Labeled Transition Systems (LTS) Supports some rich language features composition via handshaking shared variables multiple instances of processes (process labeling) Supports deadlock detection and automated verification 30

31 Finite State Processes (FSP) The graphical notation for LTSs becomes unmanageable for big processes / transition systems Alternative: Textual, algebraic notation process SWITCH = RELEASED, RELEASED = (->PRESSED), PRESSED = (release->released). process definition action prefix start state 31

32 Finite State Processes (FSP) The following process definitions are equivalent: SWITCH = RELEASED, RELEASED = (->PRESSED), PRESSED = (release->released). SWITCH = RELEASED, RELEASED = (->(release->released)). SWITCH = (->(release->switch)). again the corresponding LTS: 32

33 Choice LIGHT_LOW engages either in the actions hold or. Then behaves as LIGHT_HIGH or LIGHT_OFF, respectively LIGHT_LOW = (hold->light_high ->LIGHT_OFF) Full Light example: LIGHT = LIGHT_OFF, LIGHT_OFF = (->LIGHT_LOW), LIGHT_LOW = (hold->light_high ->LIGHT_OFF), LIGHT_HIGH = (->LIGHT_OFF). 33

34 Variables and Conditions const N = 3 range Brightness = 0..N LIGHT = OFF[0], OFF[b:Brightness] = (->ON[b]), ON[b:Brightness] = (->OFF[b] when (b<n) hold->on[b+1] when (b==n) hold->on[0]). 34

35 Parallel Composition Composite process definitions are preceeded by Shared actions must be executed at the same time by all processes that share the action Example: LIGHTSWITCH = (LIGHT SWITCH). 35

36 The LTSA Tool with Animator (for Simulation) 36

37 Summary Different kinds of systems have different characteristics Different aspects of interest require different modeling concepts LTSs are a simple modeling language for modeling concurrent reactive systems concurrent processes can communicate via handshaking or shared variables network of concurrent LTSs can be composed: mapped to another LTS that models the equivalent behavior Outlook: certain properties of LTS can be proven automatically via model-checking 37

38 Assignment: First Mini-Project First small Mini-Project, due November 4 (two weeks time) to be solved in groups of three or four Implement Labeled Transition Systems: 1. Create a class diagram for LTSs model concepts such as states, transitions, alphabet, etc. 2. Implement the class diagram in Java (or another language) 3. Implement a parallel composition operator ( ) that takes two (or more) LTSs as input and produces an LTS that is the parallel composition of the input LTSs 4. find some way to visualize the output (Graphviz or Eclipse Zest) 5. Input can be specified programmatically, optionally you can build a parser for some input file format, e.g. some XML Test it with some examples and compare results with LTSA tool 38

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Organization Prof. Dr. Joel Greenyer April 11, 2013 Organization Lecture: Thursdays, 10:15 11:45, F 128 Tutorial: Thursdays, 13:00 13:45, G 323 first

More information

Part I. Principles and Techniques

Part I. Principles and Techniques Introduction to Formal Methods Part I. Principles and Techniques Lecturer: JUNBEOM YOO jbyoo@konkuk.ac.kr Introduction Text System and Software Verification : Model-Checking Techniques and Tools In this

More information

Algorithmic verification

Algorithmic verification Algorithmic verification Ahmed Rezine IDA, Linköpings Universitet Hösttermin 2018 Outline Overview Model checking Symbolic execution Outline Overview Model checking Symbolic execution Program verification

More information

The State Explosion Problem

The State Explosion Problem The State Explosion Problem Martin Kot August 16, 2003 1 Introduction One from main approaches to checking correctness of a concurrent system are state space methods. They are suitable for automatic analysis

More information

An introduction to Uppaal and Timed Automata MVP5 1

An introduction to Uppaal and Timed Automata MVP5 1 An introduction to Uppaal and Timed Automata MVP5 1 What is Uppaal? (http://www.uppaal.com/) A simple graphical interface for drawing extended finite state machines (automatons + shared variables A graphical

More information

Process Algebras and Concurrent Systems

Process Algebras and Concurrent Systems Process Algebras and Concurrent Systems Rocco De Nicola Dipartimento di Sistemi ed Informatica Università di Firenze Process Algebras and Concurrent Systems August 2006 R. De Nicola (DSI-UNIFI) Process

More information

Model Checking. Boris Feigin March 9, University College London

Model Checking. Boris Feigin March 9, University College London b.feigin@cs.ucl.ac.uk University College London March 9, 2005 Outline 1 2 Techniques Symbolic 3 Software 4 Vs. Deductive Verification Summary Further Reading In a nutshell... Model checking is a collection

More information

Logic Model Checking

Logic Model Checking Logic Model Checking Lecture Notes 10:18 Caltech 101b.2 January-March 2004 Course Text: The Spin Model Checker: Primer and Reference Manual Addison-Wesley 2003, ISBN 0-321-22862-6, 608 pgs. the assignment

More information

A Brief Introduction to Model Checking

A Brief Introduction to Model Checking A Brief Introduction to Model Checking Jan. 18, LIX Page 1 Model Checking A technique for verifying finite state concurrent systems; a benefit on this restriction: largely automatic; a problem to fight:

More information

Introduction to Model Checking. Debdeep Mukhopadhyay IIT Madras

Introduction to Model Checking. Debdeep Mukhopadhyay IIT Madras Introduction to Model Checking Debdeep Mukhopadhyay IIT Madras How good can you fight bugs? Comprising of three parts Formal Verification techniques consist of three parts: 1. A framework for modeling

More information

Trace semantics: towards a unification of parallel paradigms Stephen Brookes. Department of Computer Science Carnegie Mellon University

Trace semantics: towards a unification of parallel paradigms Stephen Brookes. Department of Computer Science Carnegie Mellon University Trace semantics: towards a unification of parallel paradigms Stephen Brookes Department of Computer Science Carnegie Mellon University MFCSIT 2002 1 PARALLEL PARADIGMS State-based Shared-memory global

More information

Last lecture Counter design Finite state machine started vending machine example. Today Continue on the vending machine example Moore/Mealy machines

Last lecture Counter design Finite state machine started vending machine example. Today Continue on the vending machine example Moore/Mealy machines Lecture 2 Logistics HW6 due Wednesday Lab 7 this week (Tuesday exception) Midterm 2 Friday (covers material up to simple FSM (today)) Review on Thursday Yoky office hour on Friday moved to Thursday 2-:2pm

More information

Alan Bundy. Automated Reasoning LTL Model Checking

Alan Bundy. Automated Reasoning LTL Model Checking Automated Reasoning LTL Model Checking Alan Bundy Lecture 9, page 1 Introduction So far we have looked at theorem proving Powerful, especially where good sets of rewrite rules or decision procedures have

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

Lecture 2 Automata Theory

Lecture 2 Automata Theory Lecture 2 Automata Theory Ufuk Topcu Nok Wongpiromsarn Richard M. Murray EECI, 18 March 2013 Outline Modeling (discrete) concurrent systems: transition systems, concurrency and interleaving Linear-time

More information

Announcements. Problem Set Four due Thursday at 7:00PM (right before the midterm).

Announcements. Problem Set Four due Thursday at 7:00PM (right before the midterm). Finite Automata Announcements Problem Set Four due Thursday at 7:PM (right before the midterm). Stop by OH with questions! Email cs3@cs.stanford.edu with questions! Review session tonight, 7PM until whenever

More information

Lecture 2 Automata Theory

Lecture 2 Automata Theory Lecture 2 Automata Theory Ufuk Topcu Nok Wongpiromsarn Richard M. Murray Outline: Transition systems Linear-time properties Regular propereties EECI, 14 May 2012 This short-course is on this picture applied

More information

Introduction. Pedro Cabalar. Department of Computer Science University of Corunna, SPAIN 2013/2014

Introduction. Pedro Cabalar. Department of Computer Science University of Corunna, SPAIN 2013/2014 Introduction Pedro Cabalar Department of Computer Science University of Corunna, SPAIN cabalar@udc.es 2013/2014 P. Cabalar ( Department Introduction of Computer Science University of Corunna, SPAIN2013/2014

More information

Software Verification

Software Verification Software Verification Grégoire Sutre LaBRI, University of Bordeaux, CNRS, France Summer School on Verification Technology, Systems & Applications September 2008 Grégoire Sutre Software Verification VTSA

More information

Complex Systems Design & Distributed Calculus and Coordination

Complex Systems Design & Distributed Calculus and Coordination Complex Systems Design & Distributed Calculus and Coordination Concurrency and Process Algebras: Theory and Practice Francesco Tiezzi University of Camerino francesco.tiezzi@unicam.it A.A. 2014/2015 F.

More information

Embedded systems specification and design

Embedded systems specification and design Embedded systems specification and design David Kendall David Kendall Embedded systems specification and design 1 / 21 Introduction Finite state machines (FSM) FSMs and Labelled Transition Systems FSMs

More information

Program Analysis Part I : Sequential Programs

Program Analysis Part I : Sequential Programs Program Analysis Part I : Sequential Programs IN5170/IN9170 Models of concurrency Program Analysis, lecture 5 Fall 2018 26. 9. 2018 2 / 44 Program correctness Is my program correct? Central question for

More information

Finite-State Model Checking

Finite-State Model Checking EECS 219C: Computer-Aided Verification Intro. to Model Checking: Models and Properties Sanjit A. Seshia EECS, UC Berkeley Finite-State Model Checking G(p X q) Temporal logic q p FSM Model Checker Yes,

More information

Automata-based Verification - III

Automata-based Verification - III COMP30172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20: email: howard.barringer@manchester.ac.uk March 2009 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

The Montana Toolset: Formal Analysis of AADL Specifications

The Montana Toolset: Formal Analysis of AADL Specifications Fremont Associates Process Project QA The Montana Toolset: Formal Analysis of AADL Specifications SAE AS-2 2 Working Group Seal Beach, California 27 January 2005 Outline Origins, Origins, Goals, Plans

More information

Bounded Retransmission in Event-B CSP: a Case Study

Bounded Retransmission in Event-B CSP: a Case Study Available online at www.sciencedirect.com Electronic Notes in Theoretical Computer Science 280 (2011) 69 80 www.elsevier.com/locate/entcs Bounded Retransmission in Event-B CSP: a Case Study Steve Schneider

More information

Real-Time Reactive System - CCS with Time Delays

Real-Time Reactive System - CCS with Time Delays Real-Time Reactive System - CCS with Time Delays Wai Leung Sze (Stephen) Swansea University VINO 18th July 2011 Overview Introduction of real-time reactive system Describing the real-time reactive system

More information

Automata-based Verification - III

Automata-based Verification - III CS3172: Advanced Algorithms Automata-based Verification - III Howard Barringer Room KB2.20/22: email: howard.barringer@manchester.ac.uk March 2005 Third Topic Infinite Word Automata Motivation Büchi Automata

More information

Industrial Automation (Automação de Processos Industriais)

Industrial Automation (Automação de Processos Industriais) Industrial Automation (Automação de Processos Industriais) Discrete Event Systems http://users.isr.ist.utl.pt/~jag/courses/api1516/api1516.html Slides 2010/2011 Prof. Paulo Jorge Oliveira Rev. 2011-2015

More information

Timo Latvala. March 7, 2004

Timo Latvala. March 7, 2004 Reactive Systems: Safety, Liveness, and Fairness Timo Latvala March 7, 2004 Reactive Systems: Safety, Liveness, and Fairness 14-1 Safety Safety properties are a very useful subclass of specifications.

More information

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40 Comp 11 Lectures Mike Shah Tufts University July 26, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 26, 2017 1 / 40 Please do not distribute or host these slides without prior permission. Mike

More information

Automata-Theoretic Model Checking of Reactive Systems

Automata-Theoretic Model Checking of Reactive Systems Automata-Theoretic Model Checking of Reactive Systems Radu Iosif Verimag/CNRS (Grenoble, France) Thanks to Tom Henzinger (IST, Austria), Barbara Jobstmann (CNRS, Grenoble) and Doron Peled (Bar-Ilan University,

More information

7. Queueing Systems. 8. Petri nets vs. State Automata

7. Queueing Systems. 8. Petri nets vs. State Automata Petri Nets 1. Finite State Automata 2. Petri net notation and definition (no dynamics) 3. Introducing State: Petri net marking 4. Petri net dynamics 5. Capacity Constrained Petri nets 6. Petri net models

More information

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino Formal Verification Techniques Riccardo Sisto, Politecnico di Torino State exploration State Exploration and Theorem Proving Exhaustive exploration => result is certain (correctness or noncorrectness proof)

More information

Automatic Synthesis of Distributed Protocols

Automatic Synthesis of Distributed Protocols Automatic Synthesis of Distributed Protocols Rajeev Alur Stavros Tripakis 1 Introduction Protocols for coordination among concurrent processes are an essential component of modern multiprocessor and distributed

More information

Asynchronous Communication 2

Asynchronous Communication 2 Asynchronous Communication 2 INF4140 22.11.12 Lecture 11 INF4140 (22.11.12) Asynchronous Communication 2 Lecture 11 1 / 37 Overview: Last time semantics: histories and trace sets specification: invariants

More information

Design of Distributed Systems Melinda Tóth, Zoltán Horváth

Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Design of Distributed Systems Melinda Tóth, Zoltán Horváth Publication date 2014 Copyright 2014 Melinda Tóth, Zoltán Horváth Supported by TÁMOP-412A/1-11/1-2011-0052

More information

Multicore Semantics and Programming

Multicore Semantics and Programming Multicore Semantics and Programming Peter Sewell Tim Harris University of Cambridge Oracle October November, 2015 p. 1 These Lectures Part 1: Multicore Semantics: the concurrency of multiprocessors and

More information

The algorithmic analysis of hybrid system

The algorithmic analysis of hybrid system The algorithmic analysis of hybrid system Authors: R.Alur, C. Courcoubetis etc. Course teacher: Prof. Ugo Buy Xin Li, Huiyong Xiao Nov. 13, 2002 Summary What s a hybrid system? Definition of Hybrid Automaton

More information

Model Checking & Program Analysis

Model Checking & Program Analysis Model Checking & Program Analysis Markus Müller-Olm Dortmund University Overview Introduction Model Checking Flow Analysis Some Links between MC and FA Conclusion Apology for not giving proper credit to

More information

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages Homework s TM Variants and the Universal TM Homework #6 returned Homework #7 due today Homework #8 (the LAST homework!) Page 262 -- Exercise 10 (build with JFLAP) Page 270 -- Exercise 2 Page 282 -- Exercise

More information

Algebraic Trace Theory

Algebraic Trace Theory Algebraic Trace Theory EE249 Roberto Passerone Material from: Jerry R. Burch, Trace Theory for Automatic Verification of Real-Time Concurrent Systems, PhD thesis, CMU, August 1992 October 21, 2002 ee249

More information

Chapter 5: Linear Temporal Logic

Chapter 5: Linear Temporal Logic Chapter 5: Linear Temporal Logic Prof. Ali Movaghar Verification of Reactive Systems Spring 94 Outline We introduce linear temporal logic (LTL), a logical formalism that is suited for specifying LT properties.

More information

CSCI 2670 Introduction to Theory of Computing

CSCI 2670 Introduction to Theory of Computing CSCI 267 Introduction to Theory of Computing Agenda Last class Reviewed syllabus Reviewed material in Chapter of Sipser Assigned pages Chapter of Sipser Questions? This class Begin Chapter Goal for the

More information

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014 Clojure Concurrency Constructs, Part Two CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014 1 Goals Cover the material presented in Chapter 4, of our concurrency textbook In particular,

More information

Welcome to MAT 137! Course website:

Welcome to MAT 137! Course website: Welcome to MAT 137! Course website: http://uoft.me/ Read the course outline Office hours to be posted here Online forum: Piazza Precalculus review: http://uoft.me/precalc If you haven t gotten an email

More information

Modeling and Analysis of Communicating Systems

Modeling and Analysis of Communicating Systems Modeling and Analysis of Communicating Systems Lecture 5: Sequential Processes Jeroen Keiren and Mohammad Mousavi j.j.a.keiren@vu.nl and m.r.mousavi@hh.se Halmstad University March 2015 Outline Motivation

More information

Formal Techniques for Software Engineering: CCS: A Calculus for Communicating Systems

Formal Techniques for Software Engineering: CCS: A Calculus for Communicating Systems Formal Techniques for Software Engineering: CCS: A Calculus for Communicating Systems Rocco De Nicola IMT Institute for Advanced Studies, Lucca rocco.denicola@imtlucca.it June 2013 Lesson 10 R. De Nicola

More information

Transition Systems and Linear-Time Properties

Transition Systems and Linear-Time Properties Transition Systems and Linear-Time Properties Lecture #1 of Principles of Model Checking Joost-Pieter Katoen Software Modeling and Verification Group affiliated to University of Twente, Formal Methods

More information

Algebraic Trace Theory

Algebraic Trace Theory Algebraic Trace Theory EE249 Presented by Roberto Passerone Material from: Jerry R. Burch, Trace Theory for Automatic Verification of Real-Time Concurrent Systems, PhD thesis, CMU, August 1992 October

More information

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford Probabilistic Model Checking Michaelmas Term 2011 Dr. Dave Parker Department of Computer Science University of Oxford Overview Temporal logic Non-probabilistic temporal logic CTL Probabilistic temporal

More information

Labeled Transition Systems

Labeled Transition Systems Labeled Transition Systems Lecture #1 of Probabilistic Models for Concurrency Joost-Pieter Katoen Lehrstuhl II: Programmiersprachen u. Softwarevalidierung E-mail: katoen@cs.rwth-aachen.de March 12, 2005

More information

Modelling Real-Time Systems. Henrik Ejersbo Jensen Aalborg University

Modelling Real-Time Systems. Henrik Ejersbo Jensen Aalborg University Modelling Real-Time Systems Henrik Ejersbo Jensen Aalborg University Hybrid & Real Time Systems Control Theory Plant Continuous sensors actuators Task TaskTask Controller Program Discrete Computer Science

More information

CSE 331 Winter 2018 Homework 1

CSE 331 Winter 2018 Homework 1 Directions: - Due Wednesday, January 10 by 11 pm. - Turn in your work online using gradescope. You should turn in a single pdf file. You can have more than one answer per page, but please try to avoid

More information

Using Happens-Before Relationship to debug MPI non-determinism. Anh Vo and Alan Humphrey

Using Happens-Before Relationship to debug MPI non-determinism. Anh Vo and Alan Humphrey Using Happens-Before Relationship to debug MPI non-determinism Anh Vo and Alan Humphrey {avo,ahumphre}@cs.utah.edu Distributed event ordering is crucial Bob receives two undated letters from his dad One

More information

CMP 309: Automata Theory, Computability and Formal Languages. Adapted from the work of Andrej Bogdanov

CMP 309: Automata Theory, Computability and Formal Languages. Adapted from the work of Andrej Bogdanov CMP 309: Automata Theory, Computability and Formal Languages Adapted from the work of Andrej Bogdanov Course outline Introduction to Automata Theory Finite Automata Deterministic Finite state automata

More information

Model Based Testing -- FSM based testing

Model Based Testing -- FSM based testing Model Based Testing -- FSM based testing Brian Nielsen {bnielsen}@cs.aau.dk Automated Model Based Conformance Testing x>=2 Model DBLclick! click? x:=0 click? x

More information

A UTP Semantics for Communicating Processes with Shared Variables

A UTP Semantics for Communicating Processes with Shared Variables A UTP Semantics for Communicating Processes with Shared Variables Ling Shi 1, Yongxin Zhao 1, Yang Liu 2, Jun Sun 3, Jin Song Dong 1, and Shengchao Qin 4 1 National University of Singapore 2 Nanyang Technological

More information

Model checking, verification of CTL. One must verify or expel... doubts, and convert them into the certainty of YES [Thomas Carlyle]

Model checking, verification of CTL. One must verify or expel... doubts, and convert them into the certainty of YES [Thomas Carlyle] Chater 5 Model checking, verification of CTL One must verify or exel... doubts, and convert them into the certainty of YES or NO. [Thomas Carlyle] 5. The verification setting Page 66 We introduce linear

More information

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct.

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct. EE 244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2016 Temporal logic Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 244, Fall 2016

More information

ESE 601: Hybrid Systems. Instructor: Agung Julius Teaching assistant: Ali Ahmadzadeh

ESE 601: Hybrid Systems. Instructor: Agung Julius Teaching assistant: Ali Ahmadzadeh ESE 601: Hybrid Systems Instructor: Agung Julius Teaching assistant: Ali Ahmadzadeh Schedule Class schedule : Monday & Wednesday 1500 1630 Towne 305 Office hours : to be discussed (3 hrs/week) Emails:

More information

Safety and Liveness Properties

Safety and Liveness Properties Safety and Liveness Properties Lecture #6 of Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling and Verification E-mail: katoen@cs.rwth-aachen.de November 5, 2008 c JPK Overview Lecture

More information

Lecture 11: Timed Automata

Lecture 11: Timed Automata Real-Time Systems Lecture 11: Timed Automata 2014-07-01 11 2014-07-01 main Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: DC (un)decidability This Lecture:

More information

Modeling Concurrent Systems

Modeling Concurrent Systems Modeling Concurrent Systems Wolfgang Schreiner Wolfgang.Schreiner@risc.uni-linz.ac.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.uni-linz.ac.at

More information

Theory of Computation. Theory of Computation

Theory of Computation. Theory of Computation Theory of Computation Theory of Computation What is possible to compute? We can prove that there are some problems computers cannot solve There are some problems computers can theoretically solve, but

More information

Real-Time Systems. Lecture 10: Timed Automata Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany main

Real-Time Systems. Lecture 10: Timed Automata Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany main Real-Time Systems Lecture 10: Timed Automata 2013-06-04 10 2013-06-04 main Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: PLC, PLC automata This Lecture:

More information

CS256/Winter 2009 Lecture #1. Zohar Manna. Instructor: Zohar Manna Office hours: by appointment

CS256/Winter 2009 Lecture #1. Zohar Manna. Instructor: Zohar Manna   Office hours: by appointment CS256/Winter 2009 Lecture #1 Zohar Manna FORMAL METHODS FOR REACTIVE SYSTEMS Instructor: Zohar Manna Email: manna@cs.stanford.edu Office hours: by appointment TA: Boyu Wang Email: wangboyu@stanford.edu

More information

Petri nets. s 1 s 2. s 3 s 4. directed arcs.

Petri nets. s 1 s 2. s 3 s 4. directed arcs. Petri nets Petri nets Petri nets are a basic model of parallel and distributed systems (named after Carl Adam Petri). The basic idea is to describe state changes in a system with transitions. @ @R s 1

More information

T Reactive Systems: Temporal Logic LTL

T Reactive Systems: Temporal Logic LTL Tik-79.186 Reactive Systems 1 T-79.186 Reactive Systems: Temporal Logic LTL Spring 2005, Lecture 4 January 31, 2005 Tik-79.186 Reactive Systems 2 Temporal Logics Temporal logics are currently the most

More information

Embedded Systems Development

Embedded Systems Development Embedded Systems Development Lecture 2 Finite Automata & SyncCharts Daniel Kästner AbsInt Angewandte Informatik GmbH kaestner@absint.com Some things I forgot to mention 2 Remember the HISPOS registration

More information

An Introduction to Hybrid Systems Modeling

An Introduction to Hybrid Systems Modeling CS620, IIT BOMBAY An Introduction to Hybrid Systems Modeling Ashutosh Trivedi Department of Computer Science and Engineering, IIT Bombay CS620: New Trends in IT: Modeling and Verification of Cyber-Physical

More information

Generalized FSM model: Moore and Mealy

Generalized FSM model: Moore and Mealy Lecture 18 Logistics HW7 is due on Monday (and topic included in midterm 2) Midterm 2 on Wednesday in lecture slot cover materials up to today s lecture Review session Tuesday 4:15pm in EEB125 Last lecture

More information

A Sample State Machine

A Sample State Machine A Sample State Machine Environment Signatures An environment signature is a triple of sets of guards, actions, and messages. H = (G H, A H, M H ) Guards: formulas in some logical language, e.g. OCL. Actions

More information

Stéphane Lafortune. August 2006

Stéphane Lafortune. August 2006 UNIVERSITY OF MICHIGAN DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE LECTURE NOTES FOR EECS 661 CHAPTER 1: INTRODUCTION TO DISCRETE EVENT SYSTEMS Stéphane Lafortune August 2006 References for

More information

Methods for Software Verification. Andrea Corradini Gian Luigi Ferrari. Second Semester 6 CFU

Methods for Software Verification. Andrea Corradini Gian Luigi Ferrari. Second Semester 6 CFU Methods for Software Verification Andrea Corradini Gian Luigi Ferrari Second Semester 6 CFU. The importance of Software Correctness Increasing integration of ICT in different applications: Embedded systems

More information

Automata-theoretic analysis of hybrid systems

Automata-theoretic analysis of hybrid systems Automata-theoretic analysis of hybrid systems Madhavan Mukund SPIC Mathematical Institute 92, G N Chetty Road Chennai 600 017, India Email: madhavan@smi.ernet.in URL: http://www.smi.ernet.in/~madhavan

More information

Verifying Randomized Distributed Algorithms with PRISM

Verifying Randomized Distributed Algorithms with PRISM Verifying Randomized Distributed Algorithms with PRISM Marta Kwiatkowska, Gethin Norman, and David Parker University of Birmingham, Birmingham B15 2TT, United Kingdom {M.Z.Kwiatkowska,G.Norman,D.A.Parker}@cs.bham.ac.uk

More information

Introduction to Computer Programming, Spring Term 2018 Practice Assignment 3 Discussion:

Introduction to Computer Programming, Spring Term 2018 Practice Assignment 3 Discussion: German University in Cairo Media Engineering and Technology Prof. Dr. Slim Abdennadher Dr. Mohammed Abdel Megeed Introduction to Computer Programming, Spring Term 2018 Practice Assignment 3 Discussion:

More information

Analysis and Optimization of Discrete Event Systems using Petri Nets

Analysis and Optimization of Discrete Event Systems using Petri Nets Volume 113 No. 11 2017, 1 10 ISSN: 1311-8080 (printed version); ISSN: 1314-3395 (on-line version) url: http://www.ijpam.eu ijpam.eu Analysis and Optimization of Discrete Event Systems using Petri Nets

More information

Semi-asynchronous. Fault Diagnosis of Discrete Event Systems ALEJANDRO WHITE DR. ALI KARIMODDINI OCTOBER

Semi-asynchronous. Fault Diagnosis of Discrete Event Systems ALEJANDRO WHITE DR. ALI KARIMODDINI OCTOBER Semi-asynchronous Fault Diagnosis of Discrete Event Systems ALEJANDRO WHITE DR. ALI KARIMODDINI OCTOBER 2017 NC A&T State University http://www.ncat.edu/ Alejandro White Semi-asynchronous http://techlav.ncat.edu/

More information

Wednesday, 10 September 2008

Wednesday, 10 September 2008 MA211 : Calculus, Part 1 Lecture 2: Sets and Functions Dr Niall Madden (Mathematics, NUI Galway) Wednesday, 10 September 2008 MA211 Lecture 2: Sets and Functions 1/33 Outline 1 Short review of sets 2 Sets

More information

Outline. Wednesday, 10 September Schedule. Welcome to MA211. MA211 : Calculus, Part 1 Lecture 2: Sets and Functions

Outline. Wednesday, 10 September Schedule. Welcome to MA211. MA211 : Calculus, Part 1 Lecture 2: Sets and Functions Outline MA211 : Calculus, Part 1 Lecture 2: Sets and Functions Dr Niall Madden (Mathematics, NUI Galway) Wednesday, 10 September 2008 1 Short review of sets 2 The Naturals: N The Integers: Z The Rationals:

More information

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66 Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66 Teknillisen korkeakoulun tietojenkäsittelyteorian laboratorion tutkimusraportti 66 Espoo 2000 HUT-TCS-A66

More information

Analysis of a Boost Converter Circuit Using Linear Hybrid Automata

Analysis of a Boost Converter Circuit Using Linear Hybrid Automata Analysis of a Boost Converter Circuit Using Linear Hybrid Automata Ulrich Kühne LSV ENS de Cachan, 94235 Cachan Cedex, France, kuehne@lsv.ens-cachan.fr 1 Introduction Boost converter circuits are an important

More information

Simulation of Spiking Neural P Systems using Pnet Lab

Simulation of Spiking Neural P Systems using Pnet Lab Simulation of Spiking Neural P Systems using Pnet Lab Venkata Padmavati Metta Bhilai Institute of Technology, Durg vmetta@gmail.com Kamala Krithivasan Indian Institute of Technology, Madras kamala@iitm.ac.in

More information

HRML: a hybrid relational modelling language. He Jifeng

HRML: a hybrid relational modelling language. He Jifeng HRML: a hybrid relational modelling language He Jifeng Hybrid Systems Systems are composed by continuous physical component and discrete control component The system state evoles over time according to

More information

Requirements Validation. Content. What the standards say (*) ?? Validation, Verification, Accreditation!! Correctness and completeness

Requirements Validation. Content. What the standards say (*) ?? Validation, Verification, Accreditation!! Correctness and completeness Requirements Validation Requirements Management Requirements Validation?? Validation, Verification, Accreditation!! Check if evrything is OK With respect to what? Mesurement associated with requirements

More information

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova. Introduction to the Theory of Computation Automata 1VO + 1PS Lecturer: Dr. Ana Sokolova http://cs.uni-salzburg.at/~anas/ Setup and Dates Lectures Tuesday 10:45 pm - 12:15 pm Instructions Tuesday 12:30

More information

PRISM An overview. automatic verification of systems with stochastic behaviour e.g. due to unreliability, uncertainty, randomisation,

PRISM An overview. automatic verification of systems with stochastic behaviour e.g. due to unreliability, uncertainty, randomisation, PRISM An overview PRISM is a probabilistic model checker automatic verification of systems with stochastic behaviour e.g. due to unreliability, uncertainty, randomisation, Construction/analysis of probabilistic

More information

An Introduction to Hybrid Systems Modeling

An Introduction to Hybrid Systems Modeling CS620, IIT BOMBAY An Introduction to Hybrid Systems Modeling Ashutosh Trivedi Department of Computer Science and Engineering, IIT Bombay CS620: New Trends in IT: Modeling and Verification of Cyber-Physical

More information

A Timed CTL Model Checker for Real-Time Maude

A Timed CTL Model Checker for Real-Time Maude A Timed CTL Model Checker for Real-Time Maude Daniela Lepri 1, Erika Ábrahám 2, and Peter Csaba Ölveczky 1 1 University of Oslo and 2 RWTH Aachen Real-Time Maude Extends Maude to real-time systems Object-oriented

More information

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication Stavros Tripakis Abstract We introduce problems of decentralized control with communication, where we explicitly

More information

Formal Conformance Testing 2006

Formal Conformance Testing 2006 Formal Conformance Testing 2006 Lecture 1 14th Sep 2006 Welcome! This is T-79.5304: Formal Conformance Testing Lectures from 10 to 12 am, no regular tutorials Cancellations and other notes at the web page

More information

CS 581: Introduction to the Theory of Computation! Lecture 1!

CS 581: Introduction to the Theory of Computation! Lecture 1! CS 581: Introduction to the Theory of Computation! Lecture 1! James Hook! Portland State University! hook@cs.pdx.edu! http://www.cs.pdx.edu/~hook/cs581f10/! Welcome!! Contact Information! Jim Hook! Office:

More information

Discrete Event Systems Exam

Discrete Event Systems Exam Computer Engineering and Networks Laboratory TEC, NSG, DISCO HS 2016 Prof. L. Thiele, Prof. L. Vanbever, Prof. R. Wattenhofer Discrete Event Systems Exam Friday, 3 rd February 2017, 14:00 16:00. Do not

More information

Models of Concurrency

Models of Concurrency Models of Concurrency GERARDO SCHNEIDER UPPSALA UNIVERSITY DEPARTMENT OF INFORMATION TECHNOLOGY UPPSALA, SWEDEN Thanks to Frank Valencia Models of Concurrency p.1/57 Concurrency is Everywhere Concurrent

More information

Hybrid Control and Switched Systems. Lecture #1 Hybrid systems are everywhere: Examples

Hybrid Control and Switched Systems. Lecture #1 Hybrid systems are everywhere: Examples Hybrid Control and Switched Systems Lecture #1 Hybrid systems are everywhere: Examples João P. Hespanha University of California at Santa Barbara Summary Examples of hybrid systems 1. Bouncing ball 2.

More information

CIS 505 Software Systems Lecture Note on CSP. Prefix. Recursion. Communicating Sequential Processes (CSP)

CIS 505 Software Systems Lecture Note on CSP. Prefix. Recursion. Communicating Sequential Processes (CSP) CIS 505 Software Systems Lecture Note on CSP Instructor: Insup Lee Department of Computer and Information Science University of Pennsylvania [The slides are originally prepared by U. Sammapun, based on

More information

Week 4 solutions. March 21, From the left hand side formula we obtain ϕ ψ = ϕ ψ = We transform the left hand side formula as follows.

Week 4 solutions. March 21, From the left hand side formula we obtain ϕ ψ = ϕ ψ = We transform the left hand side formula as follows. Week 4 solutions March 21, 2017 1 a. ϕ ψ ϕ (ψ ϕ). From the left hand side formula we obtain ϕ ψ = ϕ ψ = ϕ ψ = (ψ ϕ) = True (ψ ϕ). Here, True = (ψ ϕ) ( ψ ϕ) (ψ ϕ) ( ψ ϕ). In True (ψ ϕ), only ( ψ ϕ) can

More information

Communicating and Mobile Systems

Communicating and Mobile Systems Communicating and Mobile Systems Overview:! Programming Model! Interactive Behavior! Labeled Transition System! Bisimulation! The π-calculus! Data Structures and λ-calculus encoding in the π-calculus References:!

More information