## PolyA: True type polymorphism for Mobile Ambients (2004)

### Cached

### Download Links

Citations: | 14 - 4 self |

### BibTeX

@TECHREPORT{Amtoft04polya:true,

author = {Torben Amtoft and Henning Makholm and J. B. Wells},

title = {PolyA: True type polymorphism for Mobile Ambients},

institution = {},

year = {2004}

}

### OpenURL

### Abstract

Previous type systems for mobility calculi (the original Mobile Ambients, its variants and descendants, e.g., Boxed Ambients and Safe Ambients, and other related systems) offer little support for generic mobile agents. Previous systems either do not handle communication at all or globally assign fixed communication types to ambient names that do not change as an ambient moves around or interacts with other ambients. This makes it hard to type examples such as a messenger ambient that uses communication primitives to collect a message of non-predetermined type and deliver it to a non-predetermined destination. In contrast, we present our new type system PolyA. Instead of assigning communication types to ambient names, PolyA assigns a type to each process P that gives upper bounds on (1) the possible ambient nesting shapes of any process P ′ to which P can evolve, (2) the values that may be communicated at each location, and (3) the capabilities that can be used at each location. Because PolyA can type generic mobile agents, we believe PolyA is the first type system for a mobility calculus that provides type polymorphism comparable in power to polymorphic type systems for the λ-calculus. PolyA is easily extended to ambient calculus variants. A restriction of PolyA has principal typings. 1

### Citations

845 | Mobile ambients
- Cardelli, Gordon
- 1998
(Show Context)
Citation Context ...alculus variants. A restriction of PolyA has principal typings. 1 Introduction Whereas the π-calculus [15] is probably the most widely known calculus for communicating processes, the ambient calculus =-=[6]-=- has recently become important, because it adds reasoning about locations and mobility. In the ambient calculus, pro∗ Partially supported by EC FP5 grant IST-2001-33477, EPSRC grant GR/R41545/01, NSF ... |

788 | On understanding types, data abstraction and polymorphism
- Cardelli, Wegner
- 1985
(Show Context)
Citation Context ... essential to the concept of genericity or polymorphism. What is important is that the type system supports reasoning about distinct uses of the same generic code. We achieve what Cardelli and Wegner =-=[8]-=- called “the purest form of polymorphism: the same object or function can be used uniformly in different type context without changes, coercions or any kind of run-time tests or special encodings of r... |

602 |
Communicating and Mobile Systems: The π -Calculus
- Milner
- 1999
(Show Context)
Citation Context ...ble in power to polymorphic type systems for the λ-calculus. PolyA is easily extended to ambient calculus variants. A restriction of PolyA has principal typings. 1 Introduction Whereas the π-calculus =-=[15]-=- is probably the most widely known calculus for communicating processes, the ambient calculus [6] has recently become important, because it adds reasoning about locations and mobility. In the ambient ... |

290 |
Communicating and Mobile Systems: the pi-Calculus
- Milner
- 1999
(Show Context)
Citation Context ...le in power to polymorphic type systems for the λ-calculus. PolyA is easily extended to ambient calculus variants. A restriction of PolyA has principal typings. 1 Introduction Whereas the pi-calculus =-=[16]-=- is probably the most widely known calculus for communicating processes, the ambient calculus [7] has recently become important, because it adds reasoning about locations and mobility. In the ambient ... |

162 | Types for mobile ambients
- Cardelli, Gordon
- 1999
(Show Context)
Citation Context ...ing terms such as b[ina.0]|a[open b.0], which shape predicates cannot distinguish from!b[!ina.0]|!a[openb.0]. Thus, nearly every nontrivial use of open will need recursive σ’s. As already observed by =-=[5]-=-, open often complicates analysis significantly.sThis is the syntax of shape expressions: Shape expressions: V ::= X | U | letrec X1 = U1;...;Xn = Un in Xi Shape summands: U ::= 0 | (U|U) | π | (π1|··... |

134 | Controlling interference in ambients
- Levi, Sangiorgi
- 2000
(Show Context)
Citation Context ...principal typings (Thm. 23) for a useful restriction of PolyA. We illustrate how to extend PolyA to support the cross-ambient communication of Boxed Ambients [4], the co-capabilities of Safe Ambients =-=[12]-=-, and the process (not ambient) mobility capability of M 3 [10]. The proofs of most propositions and theorems have been omitted here for space reasons. They can be found in an extended online version ... |

100 | The poIymorphic pi-calculus: theory and implementation
- Turner
- 1996
(Show Context)
Citation Context ...m of [11] keeps track of the context “one level up”. This is sufficient to achieve a quite precise analysis, yet is “only” polynomial (n 7 ). Polymorphic type systems already exist for the π-calculus =-=[20, 18]-=-, but do not generalise easily to the spatial nature of our messenger example. 1.4 Summary of contributions (conclusion) We present PolyA, the first type system for the ambient calculus that is flexib... |

93 | An extension of the basic functionality theory for the λ-calculus - Coppo, Dezani-Ciancaglini - 1980 |

87 | The essence of principal typings
- Wells
- 2002
(Show Context)
Citation Context ...en X0 = X1 = ··· = Xk. 2 G does not contain any message type of the shape {C1,...,Ck}* such that one of the Ci’s is amb a. Allowing only modest and discrete types yields principal typings (defined in =-=[21]-=-): Theorem 23 For every term P which has at least one modest discrete type, there is a modest discrete type τ that is minimal among P’s modest discrete types. The restriction to modest discrete type m... |

81 | Boxed ambients
- Bugliesi, Castagna, et al.
- 2001
(Show Context)
Citation Context ...pe checking (Prop. 6) for PolyA. We prove principal typings (Thm. 23) for a useful restriction of PolyA. We illustrate how to extend PolyA to support the cross-ambient communication of Boxed Ambients =-=[4]-=-, the co-capabilities of Safe Ambients [12], and the process (not ambient) mobility capability of M 3 [10]. The proofs of most propositions and theorems have been omitted here for space reasons. They ... |

57 | Behavioral equivalence in the polymorphic pi-calculus
- Pierce, Sangiorgi
- 2000
(Show Context)
Citation Context ...m of [11] keeps track of the context “one level up”. This is sufficient to achieve a quite precise analysis, yet is “only” polynomial (n 7 ). Polymorphic type systems already exist for the π-calculus =-=[20, 18]-=-, but do not generalise easily to the spatial nature of our messenger example. 1.4 Summary of contributions (conclusion) We present PolyA, the first type system for the ambient calculus that is flexib... |

55 | Graph layout through the VCG tool
- Sander
- 1994
(Show Context)
Citation Context ...itively; thus one of the implied edges in the figure is Xq1 open t! Xopen2. The graph has been produced from a machine-generated source, plus some manual layout hints, using the VCG graph layout tool =-=[20]-=-. the context “one level up”. This is sufficient to achieve a quite precise analysis, yet is “only” polynomial (n7). Polymorphic type systems already exist for the pi-calculus [22, 19], but do not gen... |

44 | Shape analysis for mobile ambients
- Nielson, Nielson
- 2000
(Show Context)
Citation Context ...set of grammars is returned such that at any step, the current process can be described by one of these grammars. The analysis is very precise, but potentially also very expensive. In Kleene analysis =-=[16]-=-, a 3-valued logic is used to estimate the possible shapes. The framework allows for trade-offs w.r.t. precision versus costs. The abstract interpretation system of [11] keeps track of the context “on... |

42 | Communication interference in mobile boxed ambients
- Bugliesi, Crafa, et al.
- 2002
(Show Context)
Citation Context ...ions such as: f(X0 hµ1;:::;µki #b ! X);(X0 amb b! Y );(Y (a1;:::;ak) ? ! Z)g µ G ) hX jGi · hX0 jGi ^ [ai 7! µi]1·i·khZ jGi · hY jGi Safe Ambients [13] introduces co-capabilities (also added to BA by =-=[5]-=-), where both interaction parties must present a capability. This can improve analysis precision and avoid unwanted behaviours. The reduction rules are amended to require this, e.g.: a[open a:P|Q]|ope... |

35 | Using Ambients to Control Resources
- Teller, Zimmer, et al.
- 2002
(Show Context)
Citation Context ... |c[a[inb|inc|e[ina]]|e[ina]] The a[···] predicate inside b still allows the in b. This must be so because shape predicates do not care about the number of identical items (unlike what is the case in =-=[19]-=-), so one of the terms matched by σ1 is a[inb.0|inb.0]|b[0], which reduces tob[a[inb]]. A more subtle point about σ1 is that it disallows having an e inside an a inside a b, or a d inside an a inside ... |

32 | What are polymorphically-typed ambients
- Amtoft, Kfoury, et al.
- 2001
(Show Context)
Citation Context ...ntext without changes, coercions or any kind of run-time tests or special encodings of representations”. PolyA can optionally track the sequencing of actions, a possibility pioneered by Amtoft et al. =-=[1, 2]-=-. For example,a[inb.inc.0]|b[c[0]]|c[opena.0] has a PolyA type proving that a will never be opened.sPolyA can assign the following type to the example containing the generic messenger and two clients:... |

24 | M3: Mobility types for mobile processes in mobile ambients
- Coppo, Dezani-Ciancaglini, et al.
- 2003
(Show Context)
Citation Context ...We illustrate how to extend PolyA to support the cross-ambient communication of Boxed Ambients [4], the co-capabilities of Safe Ambients [12], and the process (not ambient) mobility capability of M 3 =-=[10]-=-. The proofs of most propositions and theorems have been omitted here for space reasons. They can be found in an extended online version of this paper [3]. In other work [14] we have developed a type ... |

20 | Subtyping and typing algorithms for mobile ambients
- Zimmer
(Show Context)
Citation Context ... 〉 can be decided effectively (actually, in polynomial time). It is worth noticing that shape simulations treat (�a) just like any other prefix type. Thus ≤ treats the “result” type covariantly (like =-=[22]-=-), whereas the input position in PolyA is a list of names and thus essentially invariant. 3.3 Type substitutions Definition 11 A type substitutionT is a function from names to message types such thatT... |

10 |
A fully abstract model for higher-order mobile ambients
- Coppo, Dezani-Ciancaglini
- 2002
(Show Context)
Citation Context ...uts, and outputs, and also represent upper bounds on the possible ambient nesting tree into which a process can evolve. Thus they look much like processes, as is also the case, e.g., for the types of =-=[9]-=-. Our type system’s basic concept is the shape predicate. The actual definition is somewhat involved, partly due to the need of handling communication, so let us introduce the concept gently with a to... |

10 |
An abstra interpretation framework for analysing mobile ambients
- Levi, Maeis
- 2001
(Show Context)
Citation Context ... expensive. In Kleene analysis [16], a 3-valued logic is used to estimate the possible shapes. The framework allows for trade-offs w.r.t. precision versus costs. The abstract interpretation system of =-=[11]-=- keeps track of the context “one level up”. This is sufficient to achieve a quite precise analysis, yet is “only” polynomial (n 7 ). Polymorphic type systems already exist for the π-calculus [20, 18],... |

10 | A dependently typed ambient calculus
- Lhoussaine, Sassone
- 2004
(Show Context)
Citation Context ...ightforward way to handle name restriction. In later work it may be possible to combine PolyA with more advanced treatments of name restriction, such as the “abstract names” of Lhoussaine and Sassone =-=[13]-=-. Fig. 1 defines the syntax and semantics of our base calculus. Whenever it has been defined that some (meta)variable letter, say “x”, ranges over a given set of objects, the notation x shall mean tha... |

8 | A Kleene analysis of mobile ambients
- Nielson, Nielson, et al.
- 2000
(Show Context)
Citation Context ...set of grammars is returned such that at any step, the current process can be described by one of these grammars. The analysis is very precise, but potentially also very expensive. In Kleene analysis =-=[16]-=-, a 3-valued logic is used to estimate the possible shapes. The framework allows for trade-offs w.r.t. precision versus costs. The abstract interpretation system of [11] keeps track of the context “on... |

4 | Orderly communication in the ambient calculus. Computer Languages - Amtoft, Kfoury, et al. - 2002 |

4 | A theory of second-order trees - Glew - 2002 |

3 |
Type inference for PolyA
- Makholm, Wells
- 2004
(Show Context)
Citation Context ...hing which no previous type system for ambients can do. The type may appear complex compared to the term it types. This is partly because we constructed it with the help of a type inference algorithm =-=[14]-=- which strives to create a very precise (and thus information-rich) type. It is possible to construct visually smaller but less precise types that also prove well defined behaviour for the messenger e... |

2 | Orderly communication in the ambient calculus
- Amtoft, Kfoury, et al.
(Show Context)
Citation Context ...ntext without changes, coercions or any kind of run-time tests or special encodings of representations”. PolyA can optionally track the sequencing of actions, a possibility pioneered by Amtoft et al. =-=[1, 2]-=-. For example,a[inb.inc.0]|b[c[0]]|c[opena.0] has a PolyA type proving that a will never be opened.sPolyA can assign the following type to the example containing the generic messenger and two clients:... |

2 | Sequence types for the π-calculus - Maffeis - 2004 |