The Join calculus A calculus of mobile agents

Similar documents
Models of Concurrency

Review of The π-calculus: A Theory of Mobile Processes

Linear Forwarders. 1 Introduction. Philippa Gardner 1, Cosimo Laneve 2, and Lucian Wischik 2

The Join Calculus: a Language for Distributed Mobile Programming

Groupe de travail. Analysis of Mobile Systems by Abstract Interpretation

A Graph Rewriting Semantics for the Polyadic π-calculus

RAPPORT DE RECHERCHE. Operational Semantics of Multi-Agent Organizations

Expressing Dynamics of Mobile Programs by Typing

Distributed Processes and Location Failures (Extended Abstract)

Trace Refinement of π-calculus Processes

MASTER S THESIS FROM FORMAL TO COMPUTATIONAL AUTHENTICITY DISTRIBUTED AND EMBEDDED SYSTEMS DEPARTMENT OF COMPUTER SCIENCE AALBORG UNIVERSITY

Analysing privacy-type properties in cryptographic protocols

Communicating and Mobile Systems

Security Abstractions and Intruder Models

A process algebraic analysis of privacy-type properties in cryptographic protocols

Towards Concurrent Type Theory

A Behavioral Congruence for Concurrent Constraint Programming with Nondeterministic Choice

Predicate Logic. Xinyu Feng 09/26/2011. University of Science and Technology of China (USTC)

One Year Later. Iliano Cervesato. ITT Industries, NRL Washington, DC. MSR 3.0:

A Note on Scope and Infinite Behaviour in CCS-like Calculi p.1/32

SPA for quantitative analysis: Lecture 6 Modelling Biological Processes

Session Types Revisited

An introduction to process calculi: Calculus of Communicating Systems (CCS)

MSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra. Iliano Cervesato. ITT Industries, NRL Washington, DC

Namespace logic: A logic for a reflective higher-order calculus

Concurrent Processes and Reaction

A π-calculus with preorders

Formalising the π-calculus in Isabelle

Mobile Processes in Bigraphs. Ole Høgh Jensen. October 2006

On the asynchronous nature of the asynchronous π-calculus

Reasoning about Time and Reliability

Higher-order Chemical Programming Style

From CCS to Hybrid π via baby steps. Bill Rounds CSE, U of Michigan

The Expressivity of Universal Timed CCP: Undecidability of Monadic FLTL and Closure Operators for Security

Temporal & Modal Logic. Acronyms. Contents. Temporal Logic Overview Classification PLTL Syntax Semantics Identities. Concurrency Model Checking

TRINITY COLLEGE DUBLIN. First-Order Reasoning for Higher-Order Concurrency

Formal Models of Timed Musical Processes Doctoral Defense

Extending the Lambda Calculus: An Eager Functional Language

Outline. Overview. Syntax Semantics. Introduction Hilbert Calculus Natural Deduction. 1 Introduction. 2 Language: Syntax and Semantics

BRICS. Decoding Choice Encodings. Basic Research in Computer Science BRICS RS Nestmann & Pierce: Decoding Choice Encodings

Theoretical Foundations of the UML

Outline F eria AADL behavior 1/ 78

The π-calculus Semantics. Equivalence and Value-Passing. Infinite Sums 4/12/2004

The Logical Meeting Point of Multiset Rewriting and Process Algebra

Nomadic π-calculi: Expressing and Verifying Communication Infrastructure for Mobile Computation

EMBEDDED SYSTEMS WILLIAM C. ROUNDS AND HOSUNG SONG

A Calculus for Control Flow Analysis of Security Protocols

Predicate Logic. Xinyu Feng 11/20/2013. University of Science and Technology of China (USTC)

On Compensation Primitives as Adaptable Processes

Towards a Practical Secure Concurrent Language

Type Soundness for Path Polymorphism

Varieties of Stochastic Calculi

Decidable Subsets of CCS

Do we have a quorum?

Languages. Languages. An Example Grammar. Grammars. Suppose we have an alphabet V. Then we can write:

An Algebraic Theory of Actors and its Application to a Simple Object-Based Language

A Sample State Machine

Developing Modal Tableaux and Resolution Methods via First-Order Resolution

On Expressiveness and Behavioural Theory of Attribute-based Communication

Communication and Concurrency: CCS. R. Milner, A Calculus of Communicating Systems, 1980

Modelling Membranes with Brane Calculi

Observed Communication Semantics for Classical Processes

Imperial College of Science, Technology and Medicine Department of Computing. A Study of Bisimulation Theory for Session Types. Dimitrios Kouzapas

A Semantics for Propositions as Sessions

Communication and Concurrency: CCS

Origin in Mathematical Logic

On Böhm Trees and Lévy-Longo Trees in π-calculus

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either

Making the unobservable, unobservable

Concurrency theory. proof-techniques for syncronous and asynchronous pi-calculus. Francesco Zappa Nardelli. INRIA Rocquencourt, MOSCOVA research team

CS 395T. Probabilistic Polynomial-Time Calculus

An Indian Journal FULL PAPER ABSTRACT KEYWORDS. Trade Science Inc.

Topics in Concurrency

Interpreting the Full λ-calculus in the π-calculus

Semantic Equivalences and the. Verification of Infinite-State Systems 1 c 2004 Richard Mayr

Strong bisimilarity can be opened

Business Process Management

Generalized Consensus and Paxos

On the Expressive Power of Global and Local Priority in Process Calculi

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Liveness of Communicating Transactions

Extending Howe s Method to Early Bisimulations for Typed Mobile Embedded Resources with Local Names

Typage et déduction dans le calcul de

MAD. Models & Algorithms for Distributed systems -- 2/5 -- download slides at

Information Systems Business Process Modelling I: Models

Transactional Events

Type Systems. Today. 1. What is the Lambda Calculus. 1. What is the Lambda Calculus. Lecture 2 Oct. 27th, 2004 Sebastian Maneth

Strand Spaces Proving Protocols Corr. Jonathan Herzog 6 April 2001

The Many Faces of Modal Logic Day 4: Structural Proof Theory

Models for Concurrency

Introduction to Kleene Algebras

Adding Recursion to Dpi

An extension of HM(X) with bounded existential and universal data-types

Concurrent Non-malleable Commitments from any One-way Function

Relating Reasoning Methodologies in Linear Logic and Process Algebra

Bisimulation Congruences for Homer

Finite Automata - Deterministic Finite Automata. Deterministic Finite Automaton (DFA) (or Finite State Machine)

Modeling and Verifying Ad Hoc Routing Protocols

Modal Logic as a Basis for Distributed Computation

The Curry-Howard Isomorphism

Transcription:

The Join calculus p. 1/32 The Join calculus A calculus of mobile agents Martin Mosegaard Jensen Mobile Computing seminar 2004, DAIMI

The Join calculus p. 2/32 Plan Motivation The reflexive CHAM Distribution: locality, migration, failure detection Observational congruence Comparison to π The JoCaml system

The Join calculus p. 3/32 Motivation Match concurrency and distribution: π has a simple and precise abstract foundation. Distributed setting: location, migration, failure? Solution: Take π, add reflection and notion of locality. Formal model: Join and The distributed reflexive CHAM Implementation: The JoCaml system

The Join calculus p. 4/32 Overview In the taxomony of the survey, Join has: Labile processes (names as values, like in π) Motile processes (notion of location)

The Join calculus p. 5/32 Syntax - Join Terms of the calculus are processes, definitions and join-patterns: P def = x ṽ def D in P P P 0 = J P D D T = x ṽ J J D def J def Notice the difference from π: Restriction, reception and replication is combined in join pattern.

The Join calculus p. 6/32 The chemical abstract machine Higher-order solutions R M of reactions and molecules. Structural rules ( ) : Reversible (syntactical rearrangements) Reduction rules ( ) : Consume terms in the solution (computation step)

The Join calculus p. 7/32 Reaction rules - Reflexive CHAM struc-join P 1 P 2 P 1, P 2 struc-null 0 struc-and D 1 D 2 D 1, D 2 struc-nodef T struc-def def D in P Dσ dv P σ dv reduction J P Jσ rv J P P σ rv

The Join calculus p. 8/32 Operational semantics reduction J P Jσ rv J P P σ rv In one computation step, reductions: consume any molecule with a given port pattern make a fresh copy of their guarded process substitute its received parameters for the sent names release the process

The Join calculus p. 9/32 Example def fruit f cake c P in fruit apple fruit pear cake pie fruit f cake c P fruit apple cake pie fruit pear fruit f cake c P fruit apple P {pear/f,pie/c}

The Join calculus p. 10/32 Distribution Issues: Location Migration Failure detection

The Join calculus p. 11/32 Distributed RCHAM The distributed RCHAM is a multiset of CHAMS: R i M i with a notion of local solutions Interaction of solutions (comm): ϕ x ṽ J P ϕ J P x ṽ (x dv[j]) (2-step: message transport, may be followed by message treatment (reduction))

The Join calculus p. 12/32 Location Attach location names to local solutions Location names: a, b,... L Location paths: ϕ, ψ,... L Solutions are now labelled: R ϕ Define: ϕ is a sub location of ψ when ψ is a prefix of ϕ. M Example: abc is a sub location of a Thus ordered solutions form a tree.

The Join calculus p. 13/32 Location constructor: D def =... a[d : P ] Locations (cont d) Creation of a sub location (struc-loc): a[d : P ] ϕ ϕ {D} ϕa {P }

The Join calculus p. 14/32 Migration Concerns the movement of a location Syntax extension: P def =... go b, κ plus a new reduction rule (move): a[d : P go b, κ ] ϕ ψb ϕ a[d : P κ ] ψb

The Join calculus p. 15/32 Failure detection In a realistic setting we need to consider failures

The Join calculus p. 15/32 Failure detection In a realistic setting we need to consider failures Simple failure model for the π-calculus?

The Join calculus p. 15/32 Failure detection In a realistic setting we need to consider failures Simple failure model for the π-calculus? Join model: Prohibit reactions inside a failed location

The Join calculus p. 15/32 Failure detection In a realistic setting we need to consider failures Simple failure model for the π-calculus? Join model: Prohibit reactions inside a failed location So we need to distinguish a failed location...

The Join calculus p. 16/32 Representing failures Tag failed locations: Ω L Location ϕ is dead if it contains Ω The position of Ω in ϕ denotes the origin of the failure

The Join calculus p. 17/32 Failure extensions New primitives: halt and fail, Rule for halting (halt): a[d : P halt ] ϕ Ωa[D : P ] ϕ And for failure detection (detect): ϕ fail a, κ ψεa ϕ κ ψεa (if ψεa is dead)

The Join calculus p. 18/32 Plan Motivation The reflexive CHAM Distribution: locality, migration, failure detection Observational congruence Comparison to π The JoCaml system

The Join calculus p. 19/32 Observational congruence What is observable?

The Join calculus p. 19/32 Observational congruence What is observable? Capability of a process to emit on free channel names

The Join calculus p. 19/32 Observational congruence What is observable? Capability of a process to emit on free channel names Define a reduction relation between processes: P P def = {P } ( ) {P } and associate an output barb x to free channel names x: def P x = x fv(p ) ṽ, R, M, P R M, x ṽ

The Join calculus p. 20/32 Observational congruence (cont d) We can now define the observational congruence to be the largest equivalence relation satisfying P, Q, P Q: x N, P x Q x P P Q, Q Q and P Q D, def D in P def D in Q R, R P R Q

The Join calculus p. 21/32 Comparison with the π-calculus π is a well-studied reference calculus Using: The observational congruence, and A core join-calculus: P def = x u P 1 P 2 def x u y v P 1 in P 2 Join is shown to be as expressive as the asynchronous π-calculus (up to their weak barbed congruences)

The Join calculus p. 22/32 Full abstraction Let P 1, P 2 be two process calculi, with resp. equivalences 1 P 1 P 1, 2 P 2 P 2. P 2 is more expressive than P 1 when fully abstract encoding [ ] 1 2 from P 1 to P 2 s.t. P, Q P 1 : P 1 Q [P ] 1 2 2 [Q] 1 2 P 1 and P 2 have the same expressive power when each one is more expressive than the other

The Join calculus p. 23/32 Encoding: π Join Method: provide fully abstract encodings: π Join Join CoreJoin CoreJoin π

The Join calculus p. 24/32 Encoding: π Join From π to Join, naive encoding: [P Q] π def = [P ] π [Q] π [νx.p ] [ xv ] π [x(v).p ] π [!x(v).p ] π def = def x o v o, v i x i κ κ v o, v i in [P ] π def = x o v o, v i def = def κ v o, v i [P ] π in x i κ def = def κ v o, v i x i κ [P ] π in x i κ

The Join calculus p. 25/32 Problem with naive encoding It should not be possible to observe reception of a message, but.. [x(u). xu] π = def κ v o, v i x o v o, v i in x i κ j 0 To ensure translation is secure in all contexts we need a firewall mechanism (in the paper)

The Join calculus p. 26/32 Encoding: π Join Naive encoding from (core) Join to π: [Q R] j [x v ] j [def x u y v Q in R] j def = [Q] j [R] j def = xv def = νxy.(!x(u).y(v).[q] j [R] j ) This translation also needs a firewall

The Join calculus p. 27/32 The JoCaml system Extension of Objective Caml Primitives for controlling locality, migration and failure detection Tight connection to the calculus Proposed as the next-generation Internet programming language

The Join calculus p. 28/32 Example in JoCaml def fruit f cake c P in fruit apple fruit pear cake pie is written: let def fruit! f cake! c = print_string (f ˆ " " ˆ c ˆ "\n"); in spawn {fruit "apple" fruit "pear" cake "pie"};;

The Join calculus p. 29/32 A mobile agent - server side let def f x = print_string ("["ˆstring_of_int(x)ˆ"] "); flush stdout; reply x*x in Ns.register "square" f vartype ;; let loc there do {} ;; Ns.register "there" there vartype; Join.server ()

The Join calculus p. 30/32 A mobile agent - client side let loc mobile do { let there = Ns.lookup "there" vartype in go there; let sqr = Ns.lookup "square" vartype in let def sum (s,n) = reply (if n = 0 then s else sum (s+sqr n, n-1)) in let res = sum (0,5) in print_string ("sum 5= "ˆstring_of_int res); flush stdout; }

The Join calculus p. 31/32 Further reading The reflexive CHAM and the join-calculus A Calculus of Mobile Agents The JoCaml system

Questions? The Join calculus p. 32/32