Communication Problems in the 7r-Calculus. M. R. F. Benevides* F. Prottit

Similar documents
Communication Errors in the π-calculus are Undecidable

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

Lazy Strong Normalization

On a Conjecture Concerning Helly Circle Graphs

Distributed Processes and Location Failures (Extended Abstract)

Recursive equations in higher-order process calculi

Paulo E. D. Pinto 1,Fábio Protti 2 and Jayme L. Szwarcfiter 3

A Graph Rewriting Semantics for the Polyadic π-calculus

Classical Combinatory Logic

Strong bisimilarity can be opened

arxiv: v1 [cs.lo] 16 Apr 2018

Separation of synchronous and asynchronous communication via testing

Deadlock verification of a DPS coordination strategy and its alternative model in pi-calculus

Models of Concurrency

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

Bisimulation and coinduction in higher-order languages

ALGEBRAIC METHODS OF AUTOMATED REASONING IN MONADIC LOGIC by José A. Alonso in Sevilla (Spain)

On the Banach-Steinhaus Theorem

Safety Analysis versus Type Inference for Partial Types

Trace Refinement of π-calculus Processes

Composition and Decomposition of DPO Transformations with Borrowed Context

Logical specification and coinduction

Time values are often denoted as positive real numbers including zero. We dene symbols to present the events of processes. Denition 2.2 l Let A be an

HOW IS A CHORDAL GRAPH LIKE A SUPERSOLVABLE BINARY MATROID?

Forcing-based cut-elimination for Gentzen-style intuitionistic sequent calculus

Computability via the Lambda Calculus with Patterns

Equations, contractions, and unique solutions

CA320 - Computability & Complexity

Making the unobservable, unobservable

Example. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s

1. Propositional Calculus

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

Beyond First-Order Logic

Model Theory of Modal Logic Lecture 5. Valentin Goranko Technical University of Denmark

Contextual equivalence

Abstract In this paper we present a multiprocessor semantics for CCS [Mil80]. An operational semantics for processes under a nite number of processors

Formal Models for Encapsulation, Structure and Hierarchy in Distributed Systems

Techniques. Contextual equivalence

Intersection Types and Lambda Theories

CS 275 Automata and Formal Language Theory

Finite Presentations of Pregroups and the Identity Problem

On the Computation Power of Name Parameterization in Higher-order Processes

Recursive types to D and beyond

Komponenten- und Service-orientierte Softwarekonstruktion

Intersection Types for

Origin in Mathematical Logic

On Upper Bounds on the Church-Rosser Theorem

The Buffered π-calculus: A Model for Concurrent Languages

CS 275 Automata and Formal Language Theory

On the Complexity of the Reflected Logic of Proofs

Modal Logic. UIT2206: The Importance of Being Formal. Martin Henz. March 19, 2014

Their proof is rather lengthy and hard to grasp; it ultimately relies on showing a periodicity for any transition graph generated from normed context-

Dipartimento di Informatica Università degli Studi di Verona

From Constructibility and Absoluteness to Computability and Domain Independence

Subtyping for Session Types in the Pi Calculus

Handbook of Logic and Proof Techniques for Computer Science

Bounded Stacks, Bags and Queues

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

Combining Propositional Dynamic Logic with Formal Concept Analysis

On the asynchronous nature of the asynchronous π-calculus

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations

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

Functions as processes: termination and the

ELEMENTS IN MATHEMATICS FOR INFORMATION SCIENCE NO.6 TURING MACHINE AND COMPUTABILITY. Tatsuya Hagino

Safety Analysis versus Type Inference

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

The Lambda Calculus. Stephen A. Edwards. Fall Columbia University

Electronic Notes in Theoretical Computer Science 18 (1998) URL: 8 pages Towards characterizing bisim

4 The semantics of full first-order logic

Duality in Logic Programming

Origin in Mathematical Logic

Small families. (at INRIA with Gérard and in the historical λ-calculus) Jean-Jacques Lévy

1. Object Calculus. Object calculus is to OO languages what lambda calculus is to functional languages

Lecture Notes on Classical Linear Logic

Postprint.

An Introduction to Temporal Logics

c 2002 Published by Elsevier Science B. V. Open access under CC BY-NC-ND license.

Decidable Subsets of CCS

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

Communicating and Mobile Systems

A Semantic Framework for Open Processes

Henk Barendregt and Freek Wiedijk assisted by Andrew Polonsky. Radboud University Nijmegen. March 5, 2012

Sub-λ-calculi, Classified

Theory of Computer Science. Theory of Computer Science. D7.1 Introduction. D7.2 Turing Machines as Words. D7.3 Special Halting Problem

Compositional Event Structure Semantics for the Internal π-calculus

On 3-valued paraconsistent Logic Programming

A brief introduction to Logic. (slides from

The Minimal Graph Model of Lambda Calculus

Probabilistic Bisimilarity as Testing Equivalence

A consistent theory of truth for languages which conform to classical logic

Relating Reasoning Methodologies in Linear Logic and Process Algebra

Interpreting the Full λ-calculus in the π-calculus

Propositional and Predicate Logic - XIII

Bilipschitz determinacy of quasihomogeneous germs

Roberto Bruni, Ugo Montanari DRAFT. Models of Computation. Monograph. May 18, Springer

Analysis and Optimization of Discrete Event Systems using Petri Nets

Abstract A new proof is given of the analogue of Böhm s Theorem in the typed lambda calculus with functional types.

Innitary lambda calculus and discrimination of Berarducci trees

Intersection and Singleton Type Assignment Characterizing Finite Böhm-Trees

Transcription:

Communication Problems in the 7r-Calculus M. R. F. Benevides* F. Prottit Abstract In this paper we deal with the notions of deadlock, starvation, and communication errors in the asynchronous polyadic 7f-calculus. We show that detecting deadlock or starvation in a given specification in 7f-calculus is an undecidable problem. We also extend the proof of undecidability of the notion of communication errors in the polyadic 7f-calculus presented in [14]. K eywords: Communicating Systems; Correctness of Concurrent Programs; Process Calculus, 1 Introd uction When specifying distributed systems and concurrent programs, one crucial question is to ensure the absence of deadlock, starvation, and communication errors. However, standard mechanisms for detecting a priori such situations in a given specification can hardly be found for general cases, since those notions are usually difficult to deal with. In fact, this is the case for the polyadic 7r-calculus: in this work, we show that detecting deadlock or starvation in a given specification in 7f-calculus is an undecidable problem. We *Universidade Federal do Rio de Janeiro, Instituto de Matemática and COPPE, Caixa Postal 68511, 21945-970, Rio de Janeiro, RJ, Brasil. Partially supported by the Conselho Nacional de Desenvolvimento Científico e Tecnológico, CNPq, Brasil. E-mail: mario~cos.ufrj.br tuniversidade Federal do Rio de Janeiro, NCE, Caixa Postal 2324, 20001-970, Rio de Janeiro, RJ, Brasil. E-mail: fabiop@nce.ufrj.br 1

also extend the proof of undecidability of the notion of communication errors in the polyadic 7f-calculus presented in Vasconcelos and Ravara's work [14]. The proof of the undecidability of deadlock detection follows the same strategy employed in [14]: the problem of deciding whether a lambda term has a normal form [6] is reduced to the problem of deciding whether a process is capable of reachii1g a deadlock situation, by defining a computable function f from À-terms into processes of the 7f-calculus, and showing that the decidability of the predicate ' f(m) E DEAD' implies the decidability of ' M.J- '. The reduction imposes no restrictions on À-terms, which may be either open or closed. The definition of f embodies the encoding of the lazy À-calculus into the the 7f-calculus described in [10, 12]. The proof of undecidability for communication errors also employs the approach described above. It is in fact an slight extension ofthe proofin [14], which is based on a reduction that considers closed À-terms only. Here, open terms are also allowed. The undecidability of starvation detection follows as a corollary of the undecidability for deadlock. 2 N otions of communication error, deadlock, and starvation in the 1r-calculus The concepts and definitions of the asynchronous polyadic 7f-calculus are used here as usual [4, 7,9]. Below, we briefly present some definitions. Definition 1 The set n of processes of the polyadic 7f-calculus is given by the following grammar: P ::= ã[v].p I a(x).p I PIQ I lixp I!a(x).P I O 2

Definition where {i} 2 The set af action labels is given by the fallawing grammar, ç {v}\{a}: a ::= 7 I a[v] lliiã[v] An internal communication within a process is denoted by 7 ( silent actian). The input actian a[v] denotes the reception on a of the sequence of names v. The autput actian liiã[v] denotes the emission to a of the sequence of names v, where some of them are bound. The symbol ~ denotes the reflexive and transitive closure of -4, and ~ denotes ~~~. In what follows, we present the notions of communication errors, deadlock, and starvation. A process with a communication error, after some silent transitions, is capable of reaching a situation in which there is a discordancy on the number of parameters involved in a communication. A pr9cess is capable of deadlock if it may reach a situation in which the computation cannot evolve. Finally, a process is capable of starvation if some part of the system may become precluded from computations. Definition 3 [13] The set ERR af 7r-pracesses with a cammunicatian errar is the fallawing set: ERR = {P I p ~ liu(ã[vl,...,vn].q I a(xl,...,xm).r I S),a E U, and n # m}. Definition 4 The set DEAD of 7r-pracesses which are capable af deadlack is the fallawing set: Definition DEAD is the fallawing set: a = {P I p ~ Q and Q f+, for ali a.} 5 The set ST ARV af 7r-pracesses which are capable afstarvatian ã STARV = {P I p ~ liu(a.a I B), where a is a(i) or ã[v],a E u, and B ~}. 3

3 Encoding the lazy À-calculus into the 7rcalculus The transference of results from the À-calculus to the 7r-calculus is achieved by using the encoding of the lazy À-calculus described below. Definition 6 [3, 6,-12J The set A o of À-terms is defined by the grammar below, where x and y range over the set of À-calculus variables: M ::= x I Àx.M I M N Free variables, closed terms, substitution, alpha-conversion etc. are defined as usual. The reduction relation is --t, and the reflexive and transitive closure of --t is ==>. We write M.!. if M is convergent, and M t otherwise. In the lazy À-calculus [1], the redex is always at the left extreme of a term. Milner's encoding of the lazy À-calculus into the 7r-calculus is given in the next definition: Definition 7 [10, 12] The encoding of the lazy À-calculus into the 7r-calculus is given by the following rules: [Àx.MDp ~ p(x, q).[m]q [xdp ~ x[p] [MN]p ~ vuv([m]u I u[v,p] I!v(q).[N]q) In what follows, some properties of the encoding are presented. Lemma 8 [12, 14] a. If [M]p ==>~ then a = p(x, q) and M.!.. 4

a b. If M t then [M]p ~, for ali a. c. If M =} Àx.N then [M]p p~ ;<; [N]q. [ ] x[ql > d. If M =} x then M p ~ "" O. e. [M]p fj ERR. Proof. Clauses a, b, and c are clauses 1, 3, and 4 of Lemma 2 in [14]. Clause d is Lemma 3 in [14]. Clause e is Proposition 5.4, 3 in [12]. D 4 U ndecidability proofs Now we are ready to present the undecidability results. Theorem 9 is a generalization of Theorem 4 in [14]. The remaining results, although not surprising, up to the authors' knowledge are new. Theorem 9 The problem 'P E ERR' is undecidable. Proof. Let us show that if the problem ' p E ERR' is decidable, then the problem ' M.!.' is decidable. Let f : A o-+ n be such that f(m) ~ vpxix2...xn([mdp I pd I XI0 I X20 I...I Xn()), where Xl, X2,..., Xn are the free variables ocurring in M. The function f is clearly computable by the encoding of the lazy À-calculus into the 7r-calculus, Now we will prove that f(m) fj ERR if and only if M t. First, assume that a M t. Then, by Lemma 8b, [MDp ~, for ali a. This means that there is no interaction between [MDp and pd, XI0, X2(),..., Xn(). That is, there is no communication error due to an interaction involving [MDp and the ports 5

above. Since [ M]p <t E RR by Lemma 8e, it follows that f ( M) <t E RR. Now, assume that f(m) <t ERR. We claim that: (a) M ~ >..x.n. Otherwise, if M => >..x.n, then [M]p p~q) by Lemma 8c. That is, there is an interaction between [M]p and p[] that causes a communication error. (b) M ~ x. Otherwise, if M => x, then [M]p XJ}1, by Lemma 8d. This means that there is an interaction between [M]p and xo leading to a communication error. Bya) and b), we conclude that M => MN. Therefore, M t. O Theorem 10 The problem 'P E DEAD' is undecidable. Proof. Let us show that if the problem ' p E DEAD' is decidable, then the problem ' M.J- ' is decidable. Let f : A o-+ II be such that f(m) ~ VPXIX2...xn([M]p I p[y, w].po I Xl(Pl).Pl I X2(P2).P2 I...I Xn(Pn).Pn), where: Xl,X2,...,Xn are the free variables ocurring in M; Y,W,Pl,...,Pn are new names; and Pi = vai(ai I Ãi), where Ai = aio.ai and Ãi = ãid.ãi. The function f is clearly computable by the encoding of the lazy >..-calculus into the 7r-calculus. Now we will prove that f(m) <t DEAD if and only if M.J-. Assume that f ( M) <t D E AD.Then there is a such that [ M]p ~.Thus, by Lemma 8b, M.J-. On the other hand, assume that M.J- and f(m) E DEAD. Under these assumptions, we have that: (a) M ~ >..x.n. Otherwise, if M => >..x.n, then [M]p p~q) by Lemma 8c. That is, there is a possible action for f(m), and after this action the computation goes on, contradicting the assumption. 6

(b) M ~ x. Otherwise, if M =?- x, then [M]p ~, by Lemma 8d. Again, this means that there is a possible action for f(m), and after this action the computation goes on, contradicting the assumption. Bya) and b), we conclude that M =?- MN. Therefore, M t, a contradiction. D Theorem 11 The problem 'P E ST ARV ' is undecidable. Proof. Let us show that if the problem ' p E ST ARV' is decidable, then the problem ' p E DEAD' is decidable. Let f : n -+ n be such that f(p) = val...an(p I AlI Ã1 I...1 An I Ãn) where al...an are the free names in P, Ai = aio.ai, and Ai = ãi[].ai, 1 :::; i:::; n. The function f is clearly computable, since f(p) can be constructed in finite time by examining the definition of P. It remains to prove that f(p) E ST ARV if and only if P E DEAD. If P E DEAD, then process P is clearly precluded from executing in f(p), that is f(p) E ST ARV. On the other hand, if P ~ DEAD, then f(p) will never reach a state where some of its parts cannot execute, that is, f(p) ~ ST ARV. D References [1] s. Abramsky. The lazy lambda calculus. Research Topics in Functional Programming, pp. 65-,-116. Addison-Wesley, 1989. [2] S. Arun-Kumar and M. Hennessy. An efficiency preorder of processes. Acta Informatica 29(8) (1992) 737-760. 7

[3] H. Barendregt. The Lambda Calculus: Its Syntax and Semantics. Studies in Logic, vol. 103. North Holland, 1984. Revised edition. [4] G. Boudol. Asynchrony and the pi-calculus. Technical Report RR-1702, INRIA Sophia-Antipolis, 1992. [5] N. Cutland. Computability: An Introduction to Recursive Function Theory. Cambridge University Press, 1980. [6] J. R. Hindley and J. P. Seldin. Introduction to Combinators and,\- Calculus. Cambridge University Press, 1986, p. 63. [7] K. Honda and M. Tokoro. An object calculus for asynchronous communication. 5th European Conference on Object-Oriented Programming, LNCS 512 (1991) 141-162. Springer- Verlag. [8] R. Milner. Communication and Concurrency. Prentice-Hall, London, 1989. [9] R. Milner. The polyadic 7r-calculus: a tutorial. In F. L. Bauer, W. Brauer, and H. Schwichtenberg, eds. Logic and Algebra of Specification, Springer- Verlag, 1993. [10] R. Milner. Functions as processes. Journal of Mathematical Structures in Computer Science 2(2) (1992) 119-141. [11] D. Sangiorgi and R. Milner. The problem of "Weak bisimulation up to".3rd International Conference on Concurrency Theory, LNCS 630 7 (1994) 331-336. [12] D. Sangiorgi. Lazy functions and mobile processes. Technical Report RR-2515, INRIA, Sophia-Antipolis, 1995. 8

[13] V. T. Vasconcelos and K. Honda. Principal typing schemes in a polyadic 7r-calculus. 4th International Conference on Concurrency Theory, LNCS 715 (1993) 524-538. Springer- Verlag. [14] V. T. Vasconcelos and A. Ravara. Communication errors in the 7rcalculus are undecidable. Information Processing Letters 71(5-6) (1999), 229-233. 9