instant polymorphic type systems for mobile process
play

Instant Polymorphic Type Systems for Mobile Process Calculi: Just - PowerPoint PPT Presentation

Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close Henning Makholm and Joe Wells Heriot-Watt University ESOP05 April 8, 2005 U seful L ogics, T ypes, Work supported by EU/IST/FET grant


  1. Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close Henning Makholm and Joe Wells Heriot-Watt University ESOP’05 – April 8, 2005 U seful L ogics, T ypes, Work supported by EU/IST/FET grant 2001-33477 (DART) R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.1/29

  2. Mobile process calculi Mobility and process calculi are used to model and reason about systems with mobile devices , mobile code , dynamically changing networks , . . . and to model biological systems and business processes . Many such calculi exist: The π -calculus – and variants Mobile Ambients – and variants Safe Ambients, Boxed Ambients, Seal – and variants D π , Higher-order π -calculus – and variants Join calculus – and variants There is no obvious best calculus. For different purposes one may need different calculi, and needs are likely to change. U seful L ogics, T ypes, R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.2/29

  3. Types for process calculi Any process and mobility calculus can benefit from having a type system . For pinpointing programming errors To prove that programs or systems are safe To provide flow information for automatic analyses Traditionally each new calculus has a type system designed specifically for it. We present the re-targetable type system Poly ✶ which automatically adapts to new calculi or variants. Allows easy experimentation with calculus variants Just write down your reduction rules. Poly ✶ does the rest. Experimenting with type system features : Which features do I need to handle this kind of code? U seful L ogics, T ypes, R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.3/29

  4. Plan Poly ✶ example Case study: Evolution of calculi Spatial polymorphism Theoretical properties Conclusion U seful L ogics, T ypes, R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.4/29

  5. An example Poly ✶ type for an ambient term a a a Term: ( x ) . b b b b b | b in x . 0 | � a � . 0 | → in a . 0 | → ֒ ֒ 0 0 0 0 Type: (x) b[] in x x:={a} x:={a} x:={a} ROOT <{a}> b[] in a a[] b[] Black edges with labels define the possible term structure. Red edges encode flow , which is the same as subtyping . U seful L ogics, Green edges encode flow/subtyping with substitutions . T ypes, R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.5/29

  6. Drawing the type graph more compactly (x) b[] in x x:={a} x:={a} x:={a} ROOT <{a}> b[] in a a[] b[] When all black edges leading to a node have the same label, we write the label inside the target node: (x) b[] in x ROOT <{a}> x:={a} x:={a} x:={a} b[] in a U seful a[] b[] L ogics, T ypes, R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.6/29

  7. Plan Poly ✶ example Case study: Evolution of calculi Spatial polymorphism Theoretical properties Conclusion U seful L ogics, T ypes, R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.7/29

  8. The siege of Troy horse Ulysses Troy Term: in Troy in horse . out horse 0 Input to Poly ✶ type inference tool: ✝ ✠ ✡ ☛ ✄ ✞ ✞ ✂ � ✁ ☎ ✆ � ✟ ✝ ✠ ✓ ✡ ✓ ✠ ✡ ✠ ✠ ✓ ✡ ✓ ✡ ☛ ✎ ✌ ✄ ✎ ✑ ✞ ✔ ✑ ✕ ✑ ✞ ✔ ✕ ✗ ☞ ✆ ✍ ✁ ✆ � ✏ � ✖ ✖ ✒ ✝ ✠ ✠ ✓ ✡ ✓ ✡ ✠ ✡ ✓ ✠ ✓ ✡ ☛ ✌ ✑ ✎ ✎ ✞ ✔ ✕ ✕ ✑ ✞ ✔ ✗ ✂ ☞ ✆ ✍ ✁ ✆ � ✘ ✍ � � ✖ ✖ ✒ ✝ ✓ ✠ ✡ ✓ ☛ ✌ ✎ ✎ ✞ ✚ ✞ ✚ ✗ � � ☞ ✆ ✍ ✁ ✆ ✘ ✙ ✆ ✏ ✖ ✖ ✒ ✝ ✠ ✡ ✜ ✄ ✣ ✂ ✆ ☞ ✛ ✘ ☞ ✢ ✆ ✏ ☞ ✘ ✤ ✓ ✠ ✡ ✥ ✦ ✄ ✜ ✜ ✂ ✤ ✢ ✢ ✆ ✢ ✏ ✘ ☞ ✢ ✆ ✘ ✍ ✘ ☞ ✢ ✆ ✒ ✓ ✠ ✡ ✣ ✧ ☞ ✘ ✤ ☛ U seful L ogics, T ypes, R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.8/29

  9. The siege of Troy horse Ulysses Troy Term: in Troy in horse . out horse 0 Inferred type: Ulysses[] Troy[] horse[] in Troy ROOT horse[] in horse out horse Ulysses[] U seful L ogics, T ypes, R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.9/29

  10. Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.10/29 What if one needed permission to enter and exit ambients? ☛ ☛ ☛ ✚ ✚ ✡ ✚ Safe Ambients, first try ✡ � ✒ ✓ ✚ ✓ ✎ ✡ ✑ ✒ ✕ ✂ ✔ ✡ ✍ ✕ ✓ ✘ ✞ ✎ ✓ � ✏ ✠ ✒ ✖ ✕ ✘ ✑ ✄ ✡ ✔ ✁ ✖ ✎ ✓ ✏ ✘ ✎ ✓ ✓ ✚ ✞ ✁ ✆ ✡ ✠ ✙ ✆ ✎ ✓ ✡ ✡ � ✕ ✘ ✢ ✆ ✓ ✠ ✠ ☞ ✖ ✢ ✓ ✡ � ✑ ✕ ✘ ✞ ✘ ☞ ✜ ✕ ✁ ✘ ✠ ✜ ✗ ✗ ✗ ✎ ✓ ✏ ✑ ✖ ✖ ✖ ✄ ✖ ✖ ✖ ✂ ✡ ✓ ✍ ✔ ✖ ✓ ✚ ✘ ✘ ✡ ✠ ✁ ✧ ✡ ✓ � ✒ ✔ ✆ ✞ ✤ ✒ ✢ ✓ ☞ ✘ ✓ ✓ � ✒ ✤ ☞ ✘ ✞ ✞ ✜ ✣ ☛ ✘ ☞ ✎ � ✣ ✏ ✏ ✑ ✒ ✂ ✒ ✡ ✞ ✍ ✄ ✄ ✠ ✘ ✏ ✠ ✖ ✎ ✎ � ✏ ✏ ✄ ✢ ✘ ✎ ✠ ✠ ✄ ✆ ✆ ✁ ✑ ✙ ✢ ✠ ✆ ✎ ✟ ✤ ✠ ✠ ✘ ✢ ✢ � � ☞ ✤ ✞ ✘ ✎ ☞ ✘ ✦ ✜ ✥ ✣ ✝ ✝ ✝ ✝ R ewriting, and their ✆ ✆ ✆ ✆ A utomation ☎ ✁ ✁ ✁ ✝ ☛ ✓ ✓ ✍ ✍ ✍ ✛ ✄ ✌ ✌ ✌ ☞ ✂ ✁ ✆ ✆ ✆ ✆ T ypes, � ☞ ☞ ☞ L ogics, ✂ U seful

  11. Safe Ambients, first try What if one needed permission to enter and exit ambients? Inferred type: co-in Troy Ulysses[] in horse out horse Troy[] horse[] co-in horse ROOT horse[] in Troy Ulysses[] Hmm. This seems to work. Or does it? U seful L ogics, T ypes, R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.11/29

  12. Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.12/29 ☛ ☛ ☛ The first try did not work If the horse can use the “ co - in Troy ”, then so can he. ✚ ✚ ✡ ✚ ✡ � ✒ ✓ ✡ ✚ ✓ ✤ ✎ ✡ ✑ ✒ ✕ ✂ ✔ ✘ ✡ ✍ ✕ ☞ ✓ ✣ ✘ ✞ ✎ ✓ � ✏ ✠ ✒ ✖ ✕ ✘ ✑ ✏ ✄ ✡ ✔ ✁ ✄ ✖ ✎ ✓ ✏ ✘ ✎ ✓ ✓ Unfortunately, Ulysses is rather clever. ✚ ✞ ✁ ✆ ✡ ✓ ✠ ✙ ✆ ✎ ✓ ✡ � ✕ ✘ ✢ ✆ ✓ ✠ ✠ ☞ ✖ ✢ ✓ ✡ � ✑ ✕ ✘ ✞ ✘ ☞ ✜ ✕ ✁ ✘ ✠ ✜ ✗ ✗ ✗ ✎ ✓ ✏ ✑ ✖ ✖ ✖ ✄ ✂ ✖ ✖ ✖ ✡ ✓ ✍ ✔ ✖ ✓ ✚ ✘ ✘ ✡ ✠ ✁ ✧ ✡ ✓ � ✒ ✔ ✆ ✞ ✢ ✤ ✒ ✓ ☞ ✘ ✓ ✓ � ✒ ✤ ☞ ✘ ✞ ✞ ✜ ✣ ☛ ✘ ☞ ✎ � ✒ ✣ ✏ ✏ ✑ ✒ ✂ ✡ ✞ ✍ ✄ ✄ ✏ ✠ ✘ ✠ ✎ ✖ ✎ � ✏ ✏ ✄ ✢ ✘ ✎ ✠ ✠ ✄ ✆ ✆ ✁ ✑ ✙ ✢ ✠ ✆ ✎ ✟ ✤ ✠ ✠ ✘ ✢ ✢ � � ☞ ✤ ✞ ✘ ✎ ✘ ✦ ☞ ✜ ✥ ✣ ✝ ✝ ✝ ✝ R ewriting, and their ✆ ✆ ✆ ✆ A utomation ☎ ✁ ✁ ✝ ✁ ☛ ✓ ✓ ✍ ✍ ✍ ✛ ✄ ✌ ✌ ✌ ☞ ✂ ✁ ✆ ✆ ✆ ✆ T ypes, � ☞ ☞ ☞ L ogics, ✂ U seful

  13. The first try did not work Unfortunately, Ulysses is rather clever. If the horse can use the “ co - in Troy ”, then so can he. Inferred type: Ulysses[] Ulysses[] co-in Troy Troy[] co-in horse horse[] in Troy in horse out horse ROOT horse[] Ulysses[] in Troy Ulysses[] U seful L ogics, T ypes, R ewriting, and their A utomation Instant Polymorphic Type Systems for Mobile Process Calculi: Just Add Reduction Rules and Close – p.13/29

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend