C. Varela1 Chapter 5: Join Calculus Programming Distributed Computing Systems: A Foundational Approach Carlos Varela Rensselaer Polytechnic Institute.

Slides:



Advertisements
Similar presentations
1 Interprocess Communication 1. Ways of passing information 2. Guarded critical activities (e.g. updating shared data) 3. Proper sequencing in case of.
Advertisements

Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
Design of a biomolecular Device that executes process Algebra Urmi Majumder and John Reif Department of Computer Science Duke University DNA15, JUNE 10,
1 1 Regression Verification for Multi-Threaded Programs Sagar Chaki, SEI-Pittsburgh Arie Gurfinkel, SEI-Pittsburgh Ofer Strichman, Technion-Haifa Originally.
Chapter 6: Process Synchronization
Programming Paradigms for Concurrency Lecture 11 Part III – Message Passing Concurrency TexPoint fonts used in EMF. Read the TexPoint manual before you.
1 Relational Algebra & Calculus. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.  Relational.
CS 355 – Programming Languages
Monitors Chapter 7. The semaphore is a low-level primitive because it is unstructured. If we were to build a large system using semaphores alone, the.
Code-Carrying Proofs Aytekin Vargun Rensselaer Polytechnic Institute.
Course on Probabilistic Methods in Concurrency (Concurrent Languages for Probabilistic Asynchronous Communication) Lecture 1 The pi-calculus and the asynchronous.
Foundations of Interaction ETAPS `05 0 Ex nihilo: a reflective higher- order process calculus The  -calculus L.G. Meredith 1 & Matthias Radestock.
10. Petri Nets Prof. O. Nierstrasz. Roadmap  Definition: —places, transitions, inputs, outputs —firing enabled transitions  Modelling: —concurrency.
Foundations of Programming Languages: Introduction to Lambda Calculus
1 Nominal Calculi for Transactions: JOIN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration.
7. Fixed Points. © O. Nierstrasz PS — Fixed Points 7.2 Roadmap  Representing Numbers  Recursion and the Fixed-Point Combinator  The typed lambda calculus.
Focusing in Proof-search and Concurrent Synchronization Deepak Garg Carnegie Mellon University (Based on joint work with Frank Pfenning)
CP — Concurrent Programming 12. Petri Nets Prof. O. Nierstrasz Wintersemester 2005 / 2006.
Hernán Melgratti joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica - Università di Pisa Flat Committed Join in Join.
Chapter 11: Distributed Processing Parallel programming Principles of parallel programming languages Concurrent execution –Programming constructs –Guarded.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
7. Fixed Points. © O. Nierstrasz PS — Fixed Points 7.2 Roadmap  Representing Numbers  Recursion and the Fixed-Point Combinator  The typed lambda calculus.
Common Sub-expression Elim Want to compute when an expression is available in a var Domain:
1 Formal Models for Distributed Negotiations From Petri Nets to Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
C. Varela1 Programming Languages (CSCI 4430/6969) Lambda Calculus Carlos Varela Rennselaer Polytechnic Institute September 17, 2007.
Programming Language Semantics Denotational Semantics Chapter 5 Part III Based on a lecture by Martin Abadi.
Mobile Ambients Luca Cardelli Digital Equipment Corporation, Systems Research Center Andrew D. Gordon University of Cambridge, Computer Laboratory Presented.
Prof. Diletta Romana Cacciagrano.  From sequential over concurrent to mobile systems  Introduction to the Pi-Calculus  Operational Equivalences based.
CSE S. Tanimoto Lambda Calculus 1 Lambda Calculus What is the simplest functional language that is still Turing complete? Where do functional languages.
CS5204 – Operating Systems 1  -Calculus Reasoning about concurrency and communication (Part 1).
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Operating Systems CMPSC 473 Mutual Exclusion Lecture 14: October 14, 2010 Instructor: Bhuvan Urgaonkar.
1 Concurrency Architecture Types Tasks Synchronization –Semaphores –Monitors –Message Passing Concurrency in Ada Java Threads.
1 ML fun x -> e e 1 e 2 0, 1, 2,..., +, -,... true, false, if e then e else e patterns datatypes exceptions structures functors let f x = e variables These.
Coordination Models and Languages Part I: Coordination Languages and Linda Part II: Technologies based on Tuple space concept beyond Linda Part III: Comparison.
The Complexity of Distributed Algorithms. Common measures Space complexity How much space is needed per process to run an algorithm? (measured in terms.
© Kenneth C. Louden, Chapter 11 - Functional Programming, Part III: Theory Programming Languages: Principles and Practice, 2nd Ed. Kenneth C. Louden.
Formal Specification and Analysis of Software Architectures Using the Chemical Abstract Machine Model CS 5381 Juan C. González Authors: Paola Inverardi.
CSE-321 Programming Languages -Calculus (II) POSTECH March 27, 2006 박성우.
C. Varela1 Chapter 4: Actors Programming Distributed Computing Systems: A Foundational Approach Carlos Varela Rensselaer Polytechnic Institute.
-Calculus Kangwon National University 임현승 Programming Languages These slides are based on the slides by Prof. Sungwoo Park at POSTECH.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
COMP 412, FALL Type Systems II C OMP 412 Rice University Houston, Texas Fall 2000 Copyright 2000, Robert Cartwright, all rights reserved. Students.
Dining Philosophers & Monitors Questions answered in this lecture: How to synchronize dining philosophers? What are monitors and condition variables? What.
Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. L04Ext-1 September 21, 2006http:// Some more thoughts.
1 Processes and Threads Part II Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
CSE-321 Programming Languages -Calculus (II) POSTECH March 26, 2007 박성우.
Procedure Definitions and Semantics Procedures support control abstraction in programming languages. In most programming languages, a procedure is defined.
1 Theoretical Foundations of Concurrency A formal study of concurrency enables: understanding the essential nature of concurrency reasoning about the behavior.
Types and Programming Languages Lecture 16 Simon Gay Department of Computing Science University of Glasgow 2006/07.
C. Varela1 Chapter 6: Ambient Calculus Programming Distributed Computing Systems: A Foundational Approach Carlos Varela Rensselaer Polytechnic Institute.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
1 Proving Properties of Recursive List Functions CS 270 Math Foundations of CS Jeremy Johnson.
1 Sections 3.1 – 3.2a Basic Syntax and Semantics Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Chapter 2: Lambda Calculus
Mobile Ambients Luca Cardelli Andrew D. Gordon Pravin Shetty
Chapter 3: Pi Calculus Programming Distributed Computing Systems: A Foundational Approach Carlos Varela Rensselaer Polytechnic Institute C. Varela.
Deadlocks (part II) Deadlock avoidance – (not reasonable)
Definitions Concurrent program – Program that executes multiple instructions at the same time. Process – An executing program (the running JVM for Java.
Important Concepts from Clojure
Proving Properties of Recursive List Functions
Important Concepts from Clojure
Carlos Varela Rennselaer Polytechnic Institute September 6, 2016
Procedural vs Functional Style
Critical section problem
Carlos Varela Rensselaer Polytechnic Institute November 10, 2017
Carlos Varela Rennselaer Polytechnic Institute September 8, 2017
Important Concepts from Clojure
Carlos Varela Rennselaer Polytechnic Institute September 8, 2015
Carlos Varela Rennselaer Polytechnic Institute September 10, 2019
Presentation transcript:

C. Varela1 Chapter 5: Join Calculus Programming Distributed Computing Systems: A Foundational Approach Carlos Varela Rensselaer Polytechnic Institute

Reflexive CHAM and Join Calculus Attempt to overcome “distribution” issues in π-calculus, yet keeping formal investigation results. Bridge gap between theory and practice, and form the basics for a programming language. Imposes locality and adds reflexion to generic CHAM of Boudol and Berry. Combines restriction, reception, and replication (of π- calculus) into a single (joint) receptor definition. C. Varela2

Reflexive Chemical Abstract Machine x atom M | M molecule e.g. ready ready | job D or J P reaction e.g. ready | job printer C. Varela3

Printer Example 0 ├ ready, job, job 0 ├ ready | job, job Let D = ready | job printer D ├ ready | job, job D ├ laser, job C. Varela4

Reflection def D in Pmolecule 0 ├ def D in ready | job | job D ├ ready | job | job C. Varela5

Names, Processes, Definitions P= x asynchronous polyadic message def D in Pdefinition of new names P | Pparallel composition J = x join patterns J | J D = J Pmatching join D Dpatterns to processes C. Varela6 def ~ ~

Variable Types Received variables (join patterns) rv(x ) = {u in v} rv(J | J ’ ) = rv(J) U rv(J ’ ) Defined variables (join patterns and definitions) dv(x ) = {x} dv(J | J ’ ) = dv(J) U dv(J ’ ) dv(J P) = dv(J) dv(D D ’ ) = dv(D) U dv(D ’ ) C. Varela7 ~~ def ~

Free Variables (processes and definitions) fv(J P) = dv(J) U (fv(P) – rv(J)) fv(D D ’ ) = fv(D) U fv(D ’ ) fv(x ) = {x} U {u in v} fv(def D in P) = (fv(P) U fv(D)) – dv(D) fv(P | P ’ ) = fv(P) U fv(P ’ ) C. Varela8 ~ def ~

Operational Semantics Structural Equivalence (str-join) ├ P | Q ├ P,Q (“ “ heating, “ “ cooling) (str-and)D E ├ D,E├ (str-def)├ def D in P D ├ P (red)J P ├ J J P ├ P σ dv instantiates port variable dv(D) to fresh names. σ rv substitutes transmitted names for distinct received variables rv(J). C. Varela9 σ dv σ rv

Examples 1.def x y in P messages on local name x in P are forwarded to the outside as messages on y. 2.def y x in def x y in P messages on local name x are forwarded in two steps on the external name x (internal x needs renaming). 3.def x 1 | x 2 x in P performs multiplexing of messages on x whose parts are supplied on x 1 and x 2. C. Varela10

Examples (continued) 4.def x | y k in P models π-calculus-like channels, as values are sent on x and requests for values are sent on y. 5.def s<> P s<> Q in s<> express internal non-determinism P + Q 6.def once<> | y x in y | y | y | once<> uses the message on once as a lock for non-determinism x + x + x C. Varela11

Recursion Example def loop<> P | loop<> in loop<> replicates the process P (!P), starting a new copy each time the definition is used. C. Varela12

Reference Cell def mkcell in P P = def c s in mkcell C. Varela13 def get | s k | s set | s k<> | s in s | k 0

Mutual Exclusion def s<> P | s<> Q | s<> in s<> (semaphore) def in s<> (guarantees mutual exclusion) C. Varela14 s<> def J P s<> in J P s<> def J Q s<> in J Q

Dining Philosophers def in P P = Π (phil | chopstick ) C. Varela15 phil def l<> | r<> eat | l<> | r<> in 0 chopstick c<> 0 ≤ i < n