Claim Communicating Sequential Processes (CSP) A mathematical theory for specifying and verifying complex patterns of behaviour arising from interactions.

Slides:



Advertisements
Similar presentations
Synthesis of Protocol Converter Using Timed Petri-Nets Anh Dang Balaji Krishnamoorthy Manoj Iyer Presented by:
Advertisements

Switching circuits Composed of switching elements called “gates” that implement logical blocks or switching expressions Positive logic convention (active.
Sequential Logic Circuits. Set-Reset Latch The Set-Reset latch or bistable is a simple sequential logic circuit that remembers what has happened to the.
Hardware Compilation Gordon J. Pace December 2007.
Programming in Occam-pi: A Tutorial By: Zain-ul-Abdin
Optimizing single thread performance Dependence Loop transformations.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 1 Regression Verification for Multi-Threaded Programs Sagar Chaki, SEI-Pittsburgh Arie Gurfinkel, SEI-Pittsburgh Ofer Strichman, Technion-Haifa Originally.
Concurrency Important and difficult (Ada slides copied from Ed Schonberg)
Network Protocols Dr. Eng Amr T. Abdel-Hamid NETW 703 Winter 2006 Finite State Machines (FSMs)
Parallel Programming Motivation and terminology – from ACM/IEEE 2013 curricula.
(C) P. H. Welch1 Chapter 4 Fundamentals of occam.
Structured Thread Models Kahn Process Networks, CSP, Go 1Dennis Kafura – CS5204 – Operating Systems.
Go Language * Go - Routines * Channels. New Concepts Do not communicate by sharing memory; instead, share memory by communicating. creating shared memory.
Deterministic Negotiations: Concurrency for Free Javier Esparza Technische Universität München Joint work with Jörg Desel and Philipp Hoffmann.
1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
Requirements on the Execution of Kahn Process Networks Marc Geilen and Twan Basten 11 April 2003 /e.
1 Concurrency Specification. 2 Outline 4 Issues in concurrent systems 4 Programming language support for concurrency 4 Concurrency analysis - A specification.
Equivalence of open Petri nets Modeling and analysis with Petri net components. Marc Voorhoeve (AIS)
Dependable Composition of Web Services and Process Calculi Manuel Mazzara Newcastle University.
An Introduction to Input/Output Automata Qihua Wang.
CS 584. A Parallel Programming Model We need abstractions to make it simple. The programming model needs to fit our parallel machine model. Abstractions.
A denotational framework for comparing models of computation Daniele Gasperini.
Concurrency CS 510: Programming Languages David Walker.
Sistemas Digitais I LESI - 2º ano Lesson 5 - VHDL U NIVERSIDADE DO M INHO E SCOLA DE E NGENHARIA Prof. João Miguel Fernandes Dept.
1 Ivan Lanese Computer Science Department University of Bologna Italy Behavioural Theory for SSCC Joint work with Luis Cruz-Filipe, Francisco Martins,
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
Dataflow Process Networks Lee & Parks Synchronous Dataflow Lee & Messerschmitt Abhijit Davare Nathan Kitchen.
Software Engineering, COMP201 Slide 1 Protocol Engineering Protocol Specification using CFSM model Lecture 30.
Models of Computation for Embedded System Design Alvise Bonivento.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley System-Level Types for Component-Based Design Edward A.
Processor 1 Processor 2 Disk 1 Disk 2 tasks Demo 1: Computer System with 2 Processors Sharing 2 Disks in Parallel.
Concurrency - 1 Tasking Concurrent Programming Declaration, creation, activation, termination Synchronization and communication Time and delays conditional.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Parallel & Concurrent Programming: Occam Vitaliy Lvin University of Massachusetts.
General What is an OS? What do you get when you buy an OS? What does the OS do? What are the parts of an OS? What is the kernel? What is a device.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
SDS Foil no 1 Process Algebra Process Algebra – calculating with behaviours.
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Introduction to Concurrency.
Games Development 2 Concurrent Programming CO3301 Week 9.
2-Jun-16EE5141 Chapter 3 ä The concept of the signal ä Process concurrency ä Delta time ä Concurrent and sequential statements ä Process activation by.
Programming Paradigms for Concurrency Pavol Cerny Vasu Singh Thomas Wies Part III – Message Passing Concurrency.
Module 1.2 Introduction to Verilog
Internet Security CSCE 813 Communicating Sequential Processes.
C-cards Using paper and scissors to understand Computer Science Andrea Valente Aalborg University in Esbjerg Denmark Home:
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
WSMO Presentation „A formal Approach to Component Adaption“ – Summary on a paper by A. Bracciali, A. Brogi and C. Canal … to appear in The Journal of Systems.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Lecture 4 Introduction to Promela. Promela and Spin Promela - process meta language G. Holzmann, Bell Labs (Lucent) C-like language + concurrency dyamic.
© P. H. Welch1 Lego-Land ™ Chapter 5. © P. H. Welch2 … some simple networks.
Comunication&Synchronization threads 1 Programación Concurrente Benemérita Universidad Autónoma de Puebla Facultad de Ciencias de la Computación Comunicación.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
A Theory of Distributed Objects Toward a Foundation for Component Grid Platforms Ludovic HENRIO l A Theory of Distributed Objects l Components l Perspectives.
Software Systems Verification and Validation Laboratory Assignment 4 Model checking Assignment date: Lab 4 Delivery date: Lab 4, 5.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
A Framework for Systems of Asynchronous Concurrent Processes Marek Rychlý.
Validating Reconfigurations of Reo Circuits
ALGORITHMS & FLOWCHARTING II
Some occam- Basics Co631 (Concurrency)
Process Oriented Design for Java - Concurrency for All
Process Oriented Design for Java - Concurrency for All
Concurrency Specification
CSP-Style Rendezvous Communication Thomas Feng, Edward Lee, Yang Zhao
Deadlock Detection for Distributed Process Networks
Concurrency in GO CS240 23/8/2017.
Presentation transcript:

Claim Communicating Sequential Processes (CSP) A mathematical theory for specifying and verifying complex patterns of behaviour arising from interactions between concurrent objects. CSP has a formal, and compositional, semantics that is in line with our informal intuition about the way things work.

Processes A process is a component that encapsulates some data structures and algorithms for manipulating that data. Both its data and algorithms are private. The outside world can neither see that data nor execute those algorithms! [They are not objects.] The algorithms are executed by the process in its own thread (or threads) of control. So, how does one process interact with another? myProcess

A (c) || B (c) c A A B B Synchronised Communication B may read from c at any time, but has to wait for a write. Only when both A and B are ready can the communication proceed over the channel c. c ? x A may write on c at any time, but has to wait for a read. c ! 42

‘Legoland’ Catalog IdInt (in, out) in out IdInt SuccInt (in, out) inout SuccInt PlusInt (in0, in1, out) in1 out in0 + + PrefixInt (n, in, out) out in n n TailInt (in, out) inout TailInt Delta2Int (in, out0, out1) out1 out0 in

out in IdInt IdInt (in, out) = in?x --> out!x --> IdInt (in, out) SuccInt in out SuccInt (in, out) = in?x --> out!(x + 1) --> SuccInt (in, out) in1 out in0 + + PlusInt (in0, in1, out) = (in0?x0 --> SKIP || inl?x1 --> SKIP); out!(x0 + x1) --> PlusInt (in0, in1, out) Note the parallel input

Delta2Int (in, out0, out1) = in?x --> (out0!x --> SKIP || out1!x --> SKIP); Delta2Int (in, out0, out1) out1 out0 in out in n n PrefixInt (n, in, out) = out!n --> IdInt (in, out) TailInt (in, out) = in?x --> IdInt (in, out) inout TailInt Note the parallel output

A Blocking FIFO Buffer Fifo (n, in, out) = IdInt (in, c[0]) || ([||i = 0 FOR n-2] IdInt (c[i], c[i+1])) || IdInt (c[n-2], c[n-1]) out in IdInt c[0]c[1] c[n-2] Fifo (n)

The outside world can see no difference between these two 2-place FIFOs … A Simple Equivalence IdInt (in, c) || IdInt (c, out) cinout IdInt cin n n out PrefixInt (n, in, c) || TailInt (c, out) TailInt

SuccInt 0 0 NumbersInt out NumbersInt (out) = PrefixInt (0, c, a) || Delta2Int (a, out, b) || Delta2Int (a, out, b) || SuccInt (b, c) SuccInt (b, c) a bc Some Simple Networks Note: this pushes numbers out so long as the receiver is willing to take it.

x x + y x + y + z. IntegrateInt out in xyz...xyz... IntegrateInt (out) = PlusInt (in, c, a) || Delta2Int (a, out, b) || Delta2Int (a, out, b) || PrefixInt (0, b, c) PrefixInt (0, b, c) a bc Some Simple Networks Note: this outputs one number for every input it gets.

PairsInt out TailInt + + in PairsInt (in, out) = Delta2Int (in, a, c) || TailInt (a, b) || PlusInt (b, c, out) a b c y + x z + y. xyz..xyz.. Some Simple Networks Note: this needs two inputs before producing one output. Thereafter, it produces one number for every input it gets.

Some Layered Networks FibonacciInt out PairsInt FibonacciInt (out) = PrefixInt (1, d, a) || PrefixInt (0, a, b) || PrefixInt (0, a, b) || Delta2Int (b, out, c) || Delta2Int (b, out, c) || PairsInt (b, c) PairsInt (b, c) a cd b Note: the two numbers needed by PairsInt to get started are provided by the two PrefixInt s. Thereafter, only one number circulates on the feedback loop. If only one PrefixInt had been in the circuit, deadlock would have happened (with each process waiting trying to input).