Introduction to Pi Calculus
The Pi Calculus is a formal model of concurrent computation developed by Robin Milner. It provides a way to describe processes that can interact, change structure, and evolve over time. Pi Calculus is particularly useful for modeling systems with dynamic communication patterns.
Core Concepts
- Processes: Fundamental units of execution
- Channels: Named communication pathways
- Message passing: Processes send and receive data over channels
- Channel mobility: Channels can be transmitted as messages
- Dynamic topology: Communication structure can change at runtime
Notation and Examples
a(x).P // Receive x on channel a, then behave like P
a⟨b⟩.Q // Send b on channel a, then behave like Q
a(x).P | a⟨b⟩.Q // Parallel communication: P gets b via a
Channel Mobility
ν b ( a⟨b⟩ | a(x).x⟨"hello"⟩ )
This example creates a private channel b, sends it over channel a, and then sends a message on that received channel.
Replication and Choice
!P // Infinite replication of process P
a(x).P + b(y).Q // Guarded choice