Notes on specifying systems in EST

Similar documents
Refined interfaces for compositional verification

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

CS 275 Automata and Formal Language Theory

Process Algebra CSP A Technique to Model Concurrent Programs

Chapter 14. Matrix Representations of Linear Transformations

CS375: Logic and Theory of Computing

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Convert the NFA into DFA

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

Minimal DFA. minimal DFA for L starting from any other

Hennessy-Milner Logic 1.

Supervisory Control (4CM30)

CS 275 Automata and Formal Language Theory

Introduction to spefication and verification Lecture Notes, autumn 2011

Global Session Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems

DIRECT CURRENT CIRCUITS

Global Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems

Bisimulation. R.J. van Glabbeek

This lecture covers Chapter 8 of HMU: Properties of CFLs

Real-time Concepts for a Formal Specification Language for Software / Hardware Systems

1.4 Nonregular Languages

Lesson 1: Quadratic Equations

A tutorial on sequential functions

Concepts of Concurrent Computation Spring 2015 Lecture 9: Petri Nets

Software Engineering using Formal Methods

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

Event Structures for Arbitrary Disruption

Before we can begin Ch. 3 on Radicals, we need to be familiar with perfect squares, cubes, etc. Try and do as many as you can without a calculator!!!

Non-deterministic Finite Automata

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.

We will see what is meant by standard form very shortly

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

Kleene Theorems for Free Choice Nets Labelled with Distributed Alphabets

Non-Deterministic Finite Automata

Ordinary differential equations

Temporal logic CTL : syntax. Communication and Concurrency Lecture 6. Φ ::= tt ff Φ 1 Φ 2 Φ 1 Φ 2 [K]Φ K Φ AG Φ EF Φ AF Φ EG Φ A formula can be

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

CS5371 Theory of Computation. Lecture 20: Complexity V (Polynomial-Time Reducibility)

State Minimization for DFAs

Exercises with (Some) Solutions

How to simulate Turing machines by invertible one-dimensional cellular automata

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Chapter 2 Finite Automata

Regular expressions, Finite Automata, transition graphs are all the same!!

DATABASE DESIGN I - 1DL300

CS 330 Formal Methods and Models

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

Homework 3 Solutions

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1

Formal Languages and Automata

Math 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

Finite Automata-cont d

The final exam will take place on Friday May 11th from 8am 11am in Evans room 60.

More on automata. Michael George. March 24 April 7, 2014

Self-similarity and symmetries of Pascal s triangles and simplices mod p

Designing finite automata II

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

. Double-angle formulas. Your answer should involve trig functions of θ, and not of 2θ. cos(2θ) = sin(2θ) =.

Conjunction on processes: Full abstraction via ready-tree semantics

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

. Double-angle formulas. Your answer should involve trig functions of θ, and not of 2θ. sin 2 (θ) =

Linearly Similar Polynomials

Lecture 3: Equivalence Relations

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Closure Properties of Regular Languages

Lecture 9: LTL and Büchi Automata

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

CS 275 Automata and Formal Language Theory

Lexical Analysis Finite Automate

CS375: Logic and Theory of Computing

STRUCTURE OF CONCURRENCY Ryszard Janicki. Department of Computing and Software McMaster University Hamilton, ON, L8S 4K1 Canada

Summer School Verification Technology, Systems & Applications

Lecture 08: Feb. 08, 2019

Process Algebras for Petri Nets

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

Bernoulli Numbers Jeff Morton

Non-deterministic Finite Automata

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's

RELATIONAL MODEL.

20 MATHEMATICS POLYNOMIALS

Chapter 4 Regular Grammar and Regular Sets. (Solutions / Hints)

CHAPTER 1 Regular Languages. Contents

New data structures to reduce data size and search time

Informe Técnico / Technical Report

ARITHMETIC OPERATIONS. The real numbers have the following properties: a b c ab ac

Overview HC9. Parsing: Top-Down & LL(1) Context-Free Grammars (1) Introduction. CFGs (3) Context-Free Grammars (2) Vertalerbouw HC 9: Ch.

Some Theory of Computation Exercises Week 1

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Towards High-Level Specification & Synthesis of Dynamic Process Logic

Infinite Geometric Series

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

Transcription:

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 1 Notes on specifying systems in EST Robert Meolic, Ttjn Kpus Fculty of EE & CS University of Mribor

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 2 1 Outline forml verifiction: prove the correctness of system behviour, usge: softwre, hrdwre, communiction protocols, etc., requires: forml specifiction of system behviour, requires: forml specifiction of correct behviour, requires: methods nd lgorithms (e.g. model checking). In our pper we discuss the formlism for specifiction of system behviour used in verifiction tool EST. The formlism is bsed on well-known clculus CCS.

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 3 2 Introduction EST is tool for forml verifiction of systems. A system to be verified should be specified in CCS-like syntx. Before verifiction, specifictions re trnsformed into LTSs. The EST specifictions use opertors which cn be clssified into two groups: stndrd CCS opertors nd dditionl opertors which re introduced to shorten specifictions nd to fcilitte trsltions from other formlisms.

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 4 3 Lbelled trnsition system An LTS M is qudruple (S, A τ, δ, s 0 ):?zeton S is non-empty set of sttes;?zeton A τ is set of ctions contining unobservble ction τ ;!cj τ!kv δ S A τ S is the trnsition reltion; s 0 is the initil stte.

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 5 4 Exmple 1: Peterson s lgorithm PROCESS P1 while (true) { <noncriticil section> b1=true; k=2; while (b2==true && k==2) { wit; } <criticil section> b1=flse; } PROCESS P2 while (true) { <noncriticil section> b2=true; k=1; while (b1==true && k==1) { wit; } <criticil section> b2=flse; }

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 6 5 Exmple 1: Model with LTSs P0!b1wt P1!kw2!b1wf?b2rf P2?b2rt?kr2!enter1 P3 P4?kr1!exit1 P6 P5 Figure 1: An LTS representing process P1 in Peterson s lgorithm

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 7 6 Clculus of Communicting Systems CCS is process clculus. Due to the nice lws vlid for its opertors it is lso clssified s process lgebr. Ech CCS expression defines process (lso clled n gent). CCS opertors supported by EST re: Prefix (.), Summtion (+), Composition ( ), Restriction (\), nd Relbelling ([ ]).

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 8 7 Opertor Prefix Opertor Prefix is defined with the following rule: Prefix.M M Process.M cn execute ction nd fterwrds behve s process M. This mens tht the initil stte of the LTS representing process.m should hve n -trnsition to the initil stte of the LTS representing process M.

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 9 8 Opertor Summtion Opertor Summtion is defined with the following two rules: Sum1 Sum2 M 1 M 1 (M 1 + M 2 ) M 1 M 2 M 2 (M 1 + M 2 ) M 2 If ny process prticipting in the summtion cn execute ction, then the sum cn lso execute ction. This mens tht the initil stte of the LTS representing process M 1 + M 2 should hve exctly those trnsitions which re present in the initil sttes of the LTSs representing processes M 1 nd M 2.

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 10 9 Opertor Composition Opertor Composition is defined s follows: Com1 M 1 M 1 (M 1 M 2 ) (M 1 M 2) Com2 Com3 M 1 M 2 M 2 (M 1 M 2 ) (M 1 M 2 ) M ā 1 M 2 M 2 (M 1 M 2 ) (M τ ( τ) 1 M 2 ) Composition is used to model synchronous communiction between two processes.

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 11 10 Opertor Restriction In EST, opertor Restriction is defined s follows: Res M M (M\ˆb) (M \ˆb) (b τ, = τ â ˆb) Process M\ˆb behves like process M but it cnnot execute ction with nme ˆb. This mens tht sttes in the LTS representing process M\ˆb hve exctly those trnsitions which re present in the LTS reperesenting process M nd re lbelled with n ction whose ction nme is not equl to ˆb.

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 12 11 Opertor Relbelling Opertor Relbelling is defined s follows: Rel M M M[f] f() M [f] Here, f is relbelling function such tht f(ā) = f() nd f(τ) = τ. In EST, relbelling function is given s pir of ction nmes. LTS representing process M[f] is obtined from LTS representing process M by chnging ll trnsition lbels ccording to the relbelling function f.

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 13 12 Algebric lws for CCS opertors Two specifictions re equivlent only if the processes they define re strongly equivlent [Mil89]. The following bsic lws for defined opertors re consistent with this presumption: M 1 + M 2 = M 2 + M 1 (M 1 + M 2 ) + M 3 = M 1 + (M 2 + M 3 ) M 1 M 2 = M 2 M 1 (M 1 M 2 ) M 3 = M 1 (M 2 M 3 ) M\â\ˆb = M\ˆb\â

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 14 13 More on lgebric lws Composition is distributive over Summtion: M 1 (M 2 + M 3 ) = (M 1 M 2 ) + (M 1 M 3 ) The opposite is not true. Also, Prefix is distributive neither over Summtion nor over Composition: M 1 + (M 2 M 3 ) (M 1 + M 2 ) (M 1 + M 3 ).(M 1 + M 2 ).M 1 +.M 2.(M 1 M 2 ).M 1.M 2

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 15 14 Exmple 2: Dining philosophers Figure 2: Dining philosophers (from Wikipedi)

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 16 15 Exmple 2: EST specifiction (1) PHILO =!think.!tkeleft.!tkeright.!et.!dropleft.!dropright. PHILO!dropright PHILO!think?drop!tkeleft FORK?tke FORK =!dropleft!tkeright?tke.?drop. FORK!et

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 17 16 Exmple 2: EST specifiction (2) DINNER = ( PHILO [think1/think] [tke2/tkeleft] [tke1/tkeright] [et1/et] [drop2/dropleft] [drop1/dropright] FORK [tke1/tke] [drop1/drop] PHILO [think2/think] [tke1/tkeleft] [tke2/tkeright] [et2/et] [drop1/dropleft] [drop2/dropright] FORK [tke2/tke] [drop2/drop] )\tke1\drop1\tke2\drop2

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 18 17 Exmple 2: The composition!think1 DINNER!think2 τ!think2!think1 τ τ!think2 τ τ!think1 τ!et1!think2 τ τ τ τ!think1!et2 τ!think2!et1!think1!et2 τ Figure 3: A prt of the obtined LTS for two philosophers

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 19 18 Additionl opertors CCS is quite simple formlism nd it is not very prcticl for specifiction of rel systems. To enhnce it little, the prser in EST is extended with some opertors from other formlisms (e.g. CSP nd LOTOS). Synchronistion ( ), Prtil synchronistion ( [ ] ), Interleving ( ), nd PrefixN ((+).).

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 20 19 Opertor Synchronistion Opertor Synchronistion is defined s follows: Syn1 M 1 M 1 (M 1 M 2 ) (M 1 M 2) (=τ ā A τ ) Syn2 M 2 M 2 (M 1 M 2 ) (M 1 M 2 ) (=τ ā A τ ) Syn3 M 1 M ā 1 M 2 M 2 (M 1 M 2 ) (M τ ( τ) 1 M 2 ) Opposite to opertor Composition, opertor Synchronistion requires strictly synchronous execution.

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 21 20 Prtil synchronistion Opertor Prtil synchronistion is defined s follows: Prt1 M 1 M 1 (M 1 [A] M 2 ) (M 1 [A] M 2) ( / A) Prt2 Prt3 M 2 M 2 (M 1 [A] M 2 ) ( / A) (M 1 [A] M 2 ) M 1 M ā 1 M 2 M 2 (M 1 [A] M 2 ) (M τ ( A) 1 [A] M 2 ) Prtil synchronistion is generlistion of Synchronistion such tht it requires synchronous execution of some ctions, only.

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 22 21 Opertor Interleving Opertor Interleving is defined s follows: Int1 M 1 M 1 (M 1 M 2 ) (M 1 M 2) Int2 M 2 M 2 (M 1 M 2 ) (M 1 M 2 ) Opertor Interleving is used to model synchronous prllel execution of processes. It cn be esily derived from opertor Prtil synchronistion: M 1 M 2 = M 1 [ ] M 2

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 23 22 Opertor PrefixN Opertor PrefixN is useful bbrevition supported by the EST prser. Let A i stnd for i,1. i,2..... i,ni. Then: (A 1 +A 2 +...+A N ).M A 1.M+A 2.M+...+A N.M Let A i stnd for i,2..... i,ni. Then opertor PrefixN cn be lso given s follows: PrefixN (A1 +... + A i +... + A N ).M i,1 A i.m

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 24 23 Exmple 3: Gs Sttion problem The system consists of n opertor, pump, nd customers. The opertor initilly ccepts money prepid by customers nd then ctivtes the pump. On receiving the chrge informtion from the pump, the opertor gives the chnge to the customer. Figure 4: Gs sttion in Hiroshim (from Wikipedi)

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 25 24 Exmple 3: CCS specifiction OPERATOR = (?prepy1+?prepy2).op_prepaid + (?chrge1+?chrge2).op_charged OP_PREPAID = (?vlbl.!ct+!occupied).operator OP CHARGED = (!chnge1+!chnge2). (?wit.!ct+!none).operator QUEUE =!vlbl.queue_active QUEUE_ACTIVE =?none.queue +?occupied.!wit.queue_active PUMP =?ct. (?strt1+?strt2). (?finish1+?finish2). (!chrge1+!chrge2).pump CUST =!prepy.!strt.!stop.?chnge.cust STATION = OPERATOR [vlbl,occupied,none,wit] QUEUE [ctivte,chrge1,chrge2] PUMP CUSTOMERS = CUST [prepy1/prepy][strt1/strt] [stop1/stop][chnge1/chnge] CUST [prepy2/prepy][strt2/strt] [stop2/stop][chnge2/chnge] SYSTEM = STATION [strt1,strt2,finish1,finish2] CUSTOMERS

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 26 25 Exmple 3: Obtined LTS OPERATOR = (?prepy1+?prepy2).op PREPAID + (?chrge1+?chrge2).op CHARGED OP PREPAID = (?vlbl.!ct+!occupied).operator OP CHARGED = (!chnge1+!chnge2).(?wit.!ct+!none).operator OPERATOR?prepy1?prepy2?chrge1?chrge2!occupied!ct?vlbl?wit!chnge1!chnge2!none Figure 5: A detil from the Gs Sttion problem

Robert Meolic, Ttjn Kpus: Notes on specifying systems in EST 27 26 Conclusion EST is tool for forml verifiction of systems. A system to be verified should be specified in CCS-like syntx. In the pper we mke n overview of opertors supported by EST. Besides stndrd CCS opertors, the prser includes dditionl opertors similr to those from CSP nd LOTOS. EST is free softwre. Homepge: http://lms.uni-mb.si/est/