Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
COMP30112: ConcurrencyIntroduction to Course & Introduction to FSP
Howard Barringer
Room KB2.20: email: [email protected]
January 2008
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Acknowledgement
This course was initially prepared byDr Alan Williams
and then subsequently updated by myself during sessions 2004/05and 2005/2006.
The material is firmly based on that of:Profs Magee and Kramer
of Imperial College, Dept of Computing, London.
Many thanks to all concerned.
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Acknowledgement
This course was initially prepared byDr Alan Williams
and then subsequently updated by myself during sessions 2004/05and 2005/2006.
The material is firmly based on that of:Profs Magee and Kramer
of Imperial College, Dept of Computing, London.
Many thanks to all concerned.
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Acknowledgement
This course was initially prepared byDr Alan Williams
and then subsequently updated by myself during sessions 2004/05and 2005/2006.
The material is firmly based on that of:Profs Magee and Kramer
of Imperial College, Dept of Computing, London.
Many thanks to all concerned.
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Contents
Topic 1: IntroductionGeneral BackgroundOn ConcurrencyExamplesImplementation
Topic 2: Modelling Processes with FSP - ILabelled Transition SystemsFSP: Basic ElementsSummary
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Outline
Topic 1: IntroductionGeneral BackgroundOn ConcurrencyExamplesImplementation
Topic 2: Modelling Processes with FSP - ILabelled Transition SystemsFSP: Basic ElementsSummary
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Course Structure and Topics
Lectures Topic
1 Introduction and Overview
5 FSP: Modelling Processes
5 Properties: Safety, liveness
2 Process Equality
2 Java Threads
6 Concurrency Patterns:Mutual Exclusion
Monitors+Semaphores
Producers/Consumers
Readers/Writers
GUIs
Termination
1 Revision
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
General Comments
• Some concepts familiar from COMP20051 and COMP20081
• We follow much of Magee and Kramer, but more on modelling
• Java ' COMP20051
• Java used to illustrate — BUT this is NOT a programmingcourse
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Supporting and Background Material
Books
Jeff Magee and Jeff Kramer. Concurrency: State Models andJava Programs. 2nd Edition, Wiley, 2006.L. Aceto, A Ingolfsdottir, K. Larsen and J Srba. ReactiveSystems: Modelling, Specification and Verification. CambridgeUniversity Press, 2007.R. Milner. Communication and Concurrency. Prentice-Hall,1989.C.A.R. Hoare. Communicating Sequential Processes.Prentice-Hall, 1985.
LTSA: Magee and Kramer’s modelling and analysis tool(associated with book)
Exercises: offline and in lectures
Lecture Slides: hardcopy and PDF
Notes on FSP
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Assessment
2 hour examination
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Outline
Topic 1: IntroductionGeneral BackgroundOn ConcurrencyExamplesImplementation
Topic 2: Modelling Processes with FSP - ILabelled Transition SystemsFSP: Basic ElementsSummary
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
What is Concurrency?
A set of sequential programs executed in abstract parallelism
• thread [of control]
• multi-threading
• light-weight threads
• parallel processing
• multi-processing
• multi-tasking
• shared memory
• protected work-space
• message-passing(synchronous orasynchronous)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
What is Concurrency?
A set of sequential programs executed in abstract parallelism
• thread [of control]
• multi-threading
• light-weight threads
• parallel processing
• multi-processing
• multi-tasking
• shared memory
• protected work-space
• message-passing(synchronous orasynchronous)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
What is Concurrency?
A set of sequential programs executed in abstract parallelism
• thread [of control]
• multi-threading
• light-weight threads
• parallel processing
• multi-processing
• multi-tasking
• shared memory
• protected work-space
• message-passing(synchronous orasynchronous)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
What is Concurrency?
A set of sequential programs executed in abstract parallelism
• thread [of control]
• multi-threading
• light-weight threads
• parallel processing
• multi-processing
• multi-tasking
• shared memory
• protected work-space
• message-passing(synchronous orasynchronous)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
What is Concurrency?
A set of sequential programs executed in abstract parallelism
• thread [of control]
• multi-threading
• light-weight threads
• parallel processing
• multi-processing
• multi-tasking
• shared memory
• protected work-space
• message-passing(synchronous orasynchronous)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
What is Concurrency?
A set of sequential programs executed in abstract parallelism
• thread [of control]
• multi-threading
• light-weight threads
• parallel processing
• multi-processing
• multi-tasking
• shared memory
• protected work-space
• message-passing(synchronous orasynchronous)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Why use Concurrency?
• often more closely fits intuition
• performance issues
• increased responsiveness and throughput (esp. GUIs)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Why is concurrency hard?
• algorithm development
• efficiency and performance
• simulation and testing: NON DETERMINISM
• analysis of properties: deadlock, livelock, fairness, liveness,etc.
We will consider: Modelling, Analysis and Implementation (inJava)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Why is concurrency hard?
• algorithm development
• efficiency and performance
• simulation and testing: NON DETERMINISM
• analysis of properties: deadlock, livelock, fairness, liveness,etc.
We will consider: Modelling, Analysis and Implementation (inJava)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Why is concurrency hard?
• algorithm development
• efficiency and performance
• simulation and testing: NON DETERMINISM
• analysis of properties: deadlock, livelock, fairness, liveness,etc.
We will consider: Modelling, Analysis and Implementation (inJava)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Why is concurrency hard?
• algorithm development
• efficiency and performance
• simulation and testing: NON DETERMINISM
• analysis of properties: deadlock, livelock, fairness, liveness,etc.
We will consider: Modelling, Analysis and Implementation (inJava)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Why is concurrency hard?
• algorithm development
• efficiency and performance
• simulation and testing: NON DETERMINISM
• analysis of properties: deadlock, livelock, fairness, liveness,etc.
We will consider: Modelling, Analysis and Implementation (inJava)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Why is concurrency hard?
• algorithm development
• efficiency and performance
• simulation and testing: NON DETERMINISM
• analysis of properties: deadlock, livelock, fairness, liveness,etc.
We will consider: Modelling, Analysis and Implementation (inJava)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Modelling Concurrency
• a ‘simplified’ representation of the real world?
• modelling before implementing
• model captures interesting aspects: concurrency
• animation
• analysis
• Model Description Language: FSP (Finite State Processes)
• Models: LTS (Labelled Transition Systems)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Modelling Concurrency
• a ‘simplified’ representation of the real world?
• modelling before implementing
• model captures interesting aspects: concurrency
• animation
• analysis
• Model Description Language: FSP (Finite State Processes)
• Models: LTS (Labelled Transition Systems)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Modelling Concurrency
• a ‘simplified’ representation of the real world?
• modelling before implementing
• model captures interesting aspects: concurrency
• animation
• analysis
• Model Description Language: FSP (Finite State Processes)
• Models: LTS (Labelled Transition Systems)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Modelling Concurrency
• a ‘simplified’ representation of the real world?
• modelling before implementing
• model captures interesting aspects: concurrency
• animation
• analysis
• Model Description Language: FSP (Finite State Processes)
• Models: LTS (Labelled Transition Systems)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Modelling Concurrency
• a ‘simplified’ representation of the real world?
• modelling before implementing
• model captures interesting aspects: concurrency
• animation
• analysis
• Model Description Language: FSP (Finite State Processes)
• Models: LTS (Labelled Transition Systems)
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Outline
Topic 1: IntroductionGeneral BackgroundOn ConcurrencyExamplesImplementation
Topic 2: Modelling Processes with FSP - ILabelled Transition SystemsFSP: Basic ElementsSummary
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Cruise Control System
• Does it do what we expect? Is it safe?
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
FSP: Animation
INPUTSPEED = ( engineOn -> CHECKSPEED ),CHECKSPEED = ( speed -> CHECKSPEED
| engineOff -> INPUTSPEED ).
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Structure Diagrams
SENSORSCAN
CRUISECONTROLLER
SPEED CONTROL
INPUTSPEED THROTTLE
CONTROL
speed
Sensors
setThrottle
EnginePrompts
set Sensors = {engineOn,engineOff,on,off,
resume, brake, accelerator}
set Engine = {engineOn,engineOff}
set Prompts = {clearSpeed,recordSpeed,
enableControl,disableControl}
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Outline
Topic 1: IntroductionGeneral BackgroundOn ConcurrencyExamplesImplementation
Topic 2: Modelling Processes with FSP - ILabelled Transition SystemsFSP: Basic ElementsSummary
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Implementation in Java
• Thread class; Runnable interface
• starting, stopping, suspending threads
• mutual exclusion: synchronized methods and code blocks
• monitors, condition synchronization
• wait, notify, notifyAll
• sleep, interrupt
• suspend, resume, stop
• properties: safety, liveness
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Outline
Topic 1: IntroductionGeneral BackgroundOn ConcurrencyExamplesImplementation
Topic 2: Modelling Processes with FSP - ILabelled Transition SystemsFSP: Basic ElementsSummary
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Labelled Transition Systems
What is an LTS?:
LTS = (S ,A, σ, s0)
where
S : set of states SA : alphabet A ⊆ Actσ : transition relation σ ⊆ (S × A× S)s0 initial state s0 ∈ S
Act is our set of atomic transition labels, or actions.
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
First Exercise
DAY1: A Day In the Life Of:
• Get up — action: up,
• then have a cup of tea — action: tea
• then work — action: work
F LTS for DAY1? F
• DAY2: Now repeat the Day
F LTS for DAY2? F
• DAY3: Now be able to choose coffee — action: coffee —instead of tea
F LTS for DAY3? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
First Exercise
DAY1: A Day In the Life Of:
• Get up — action: up,
• then have a cup of tea — action: tea
• then work — action: work
F LTS for DAY1? F
• DAY2: Now repeat the Day
F LTS for DAY2? F
• DAY3: Now be able to choose coffee — action: coffee —instead of tea
F LTS for DAY3? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
First Exercise
DAY1: A Day In the Life Of:
• Get up — action: up,
• then have a cup of tea — action: tea
• then work — action: work
F LTS for DAY1? F
• DAY2: Now repeat the Day
F LTS for DAY2? F
• DAY3: Now be able to choose coffee — action: coffee —instead of tea
F LTS for DAY3? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
FSP: A Textual Representation for LTS
FSP - Finite State ProcessesWhat FSP Constructs Are Required??
• sequence
• STOP
• process definition, with recursion
• choice
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
FSP: A Textual Representation for LTS
FSP - Finite State ProcessesWhat FSP Constructs Are Required??
• sequence
• STOP
• process definition, with recursion
• choice
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
FSP: A Textual Representation for LTS
FSP - Finite State ProcessesWhat FSP Constructs Are Required??
• sequence
• STOP
• process definition, with recursion
• choice
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
FSP: A Textual Representation for LTS
FSP - Finite State ProcessesWhat FSP Constructs Are Required??
• sequence
• STOP
• process definition, with recursion
• choice
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Outline
Topic 1: IntroductionGeneral BackgroundOn ConcurrencyExamplesImplementation
Topic 2: Modelling Processes with FSP - ILabelled Transition SystemsFSP: Basic ElementsSummary
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Action Prefix
If x is an action and P is a process then (x->P) describes aprocess that initially engages in the action x and then behavesexactly as described by P.
(once->STOP).
Convention:
• actions begin with a lower case letter
• PROCESS NAMES begin with an upper case letter
• STOP is a specially pre-defined FSP process name.
F FSP for DAY1? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Action Prefix
If x is an action and P is a process then (x->P) describes aprocess that initially engages in the action x and then behavesexactly as described by P.
(once->STOP).
Convention:
• actions begin with a lower case letter
• PROCESS NAMES begin with an upper case letter
• STOP is a specially pre-defined FSP process name.
F FSP for DAY1? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Process Definition
Basic form:
ProcId = process expression
The meaning of ProcId will be given by the meaning ofprocess expression.ProcId should start with an upper-case letter.
(more complex forms possible — see later. . . )
F FSP for DAY2? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Process Definition
Basic form:
ProcId = process expression
The meaning of ProcId will be given by the meaning ofprocess expression.ProcId should start with an upper-case letter.
(more complex forms possible — see later. . . )F FSP for DAY2? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Choice
• If x and y are actions then (x->P | y->Q) describes a processwhich initially engages in either of the actionsx or y.
• After that the subsequent behaviour is described by• P if the first action was x,• Q if the first action was y.
F FSP for DAY3? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Choice
• If x and y are actions then (x->P | y->Q) describes a processwhich initially engages in either of the actionsx or y.
• After that the subsequent behaviour is described by• P if the first action was x,• Q if the first action was y.
F FSP for DAY3? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Various Switches
Repetitive behaviour uses recursion:SWITCH = OFF,OFF = (on->ON),ON = (off->OFF).
Substituting to get a more concise definition:SWITCH = OFF,OFF = (on->off->OFF).
And again:SWITCH = (on->off->SWITCH).
F Are these FSP SWITCH definitions the same? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Various Switches
Repetitive behaviour uses recursion:SWITCH = OFF,OFF = (on->ON),ON = (off->OFF).
Substituting to get a more concise definition:SWITCH = OFF,OFF = (on->off->OFF).
And again:SWITCH = (on->off->SWITCH).
F Are these FSP SWITCH definitions the same? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Various Switches
Repetitive behaviour uses recursion:SWITCH = OFF,OFF = (on->ON),ON = (off->OFF).
Substituting to get a more concise definition:SWITCH = OFF,OFF = (on->off->OFF).
And again:SWITCH = (on->off->SWITCH).
F Are these FSP SWITCH definitions the same? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Various Switches
Repetitive behaviour uses recursion:SWITCH = OFF,OFF = (on->ON),ON = (off->OFF).
Substituting to get a more concise definition:SWITCH = OFF,OFF = (on->off->OFF).
And again:SWITCH = (on->off->SWITCH).
F Are these FSP SWITCH definitions the same? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Traffic Light
FSP model of a traffic light:
TRAFFICLIGHT = (red->amber->green->amber->TRAFFICLIGHT).
F LTS generated using LTSA? F
F Trace? F
red->amber->green->amber->red ->amber->green-> · · ·
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Traffic Light
FSP model of a traffic light:
TRAFFICLIGHT = (red->amber->green->amber->TRAFFICLIGHT).
F LTS generated using LTSA? F
F Trace? F
red->amber->green->amber->red ->amber->green-> · · ·
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Traffic Light
FSP model of a traffic light:
TRAFFICLIGHT = (red->amber->green->amber->TRAFFICLIGHT).
F LTS generated using LTSA? F
F Trace? F
red->amber->green->amber->red ->amber->green-> · · ·
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Traffic Light
FSP model of a traffic light:
TRAFFICLIGHT = (red->amber->green->amber->TRAFFICLIGHT).
F LTS generated using LTSA? F
F Trace? F
red->amber->green->amber->red ->amber->green-> · · ·
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Vending Machine
FSP model of a drinks machine:
DRINKS = (red->coffee->DRINKS| blue->tea->DRINKS).
F LTS generated using LTSA? F
F Possible traces? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Vending Machine
FSP model of a drinks machine:
DRINKS = (red->coffee->DRINKS| blue->tea->DRINKS).
F LTS generated using LTSA? F
F Possible traces? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: Vending Machine
FSP model of a drinks machine:
DRINKS = (red->coffee->DRINKS| blue->tea->DRINKS).
F LTS generated using LTSA? F
F Possible traces? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Non-Deterministic Choice
Process (x->P | x->Q) describes a process which engages in x andthen behaves as either P or Q.
COIN = (toss->HEADS | toss->TAILS),HEADS = (heads->COIN),TAILS = (tails->COIN).
Tossing a coin
F Possible traces? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Non-Deterministic Choice
Process (x->P | x->Q) describes a process which engages in x andthen behaves as either P or Q.
COIN = (toss->HEADS | toss->TAILS),HEADS = (heads->COIN),TAILS = (tails->COIN).
Tossing a coin
F Possible traces? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Indexed Processes and Actions
Single slot buffer that inputs a value in the range 0 to 3 and thenoutputs a value:
BUFF = (in[i : 0..3]->out[i]->BUFF).
equivalent to
BUFF = (in[0]->out[0]->BUFF|in[1]->out[1]->BUFF|in[2]->out[2]->BUFF|in[3]->out[3]->BUFF).
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Indexed Processes and Actions
Single slot buffer that inputs a value in the range 0 to 3 and thenoutputs a value:
BUFF = (in[i : 0..3]->out[i]->BUFF).
equivalent to
BUFF = (in[0]->out[0]->BUFF|in[1]->out[1]->BUFF|in[2]->out[2]->BUFF|in[3]->out[3]->BUFF).
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
or using a constant and indexed process BUFF[i]:
const N = 3BUFF = (in[i : 0..N]->BUFF[i]),BUFF[i : 0..N] = (out[i]->BUFF).
or using a process parameter with default value:
BUFF(N = 3) = (in[i : 0..N]->out[i]->BUFF).
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Guarded Actions
The choice (when B x->P | y->Q) describes a process that is like(x->P | y->Q) except that the action x can only be chosen whenthe guard B is true.
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: A Counter
COUNT(N = 3) = COUNT[0],COUNT[i : 0..N] = (when (i < N) inc->COUNT[i + 1]
|when (i > 0) dec->COUNT[i− 1]).
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: A Countdown Timer
A countdown timer which beeps after N ticks, or can be stopped.
COUNTDOWN(N = 3) = (start->COUNTDOWN[N]),COUNTDOWN[i : 0..N] = (when (i > 0) tick
->COUNTDOWN[i− 1]|when (i == 0) beep->STOP|stop->STOP).
F LTS? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: A Countdown Timer
A countdown timer which beeps after N ticks, or can be stopped.
COUNTDOWN(N = 3) = (start->COUNTDOWN[N]),COUNTDOWN[i : 0..N] = (when (i > 0) tick
->COUNTDOWN[i− 1]|when (i == 0) beep->STOP|stop->STOP).
F LTS? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Example: What is this?
F What is the following FSP process equivalent to? F
const False = 0
P = (when (False) doanything -> P).
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Constant and Range Declarations
index expressions to model a calculation:
const N = 1range T = 0..Nrange R = 0..2*N
SUM = (in[a:T][b:T] -> TOTAL[a+b]),TOTAL[s:R] = (out[s] -> SUM).
F Write SUM using basic FSP? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Constant and Range Declarations
index expressions to model a calculation:
const N = 1range T = 0..Nrange R = 0..2*N
SUM = (in[a:T][b:T] -> TOTAL[a+b]),TOTAL[s:R] = (out[s] -> SUM).
F Write SUM using basic FSP? F
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Process Alphabets
• The alphabet of a process is the set of actions in which it isallowed to engage.
• This is usually determined implicitly as the actions in which itcan engage.
• But the implicit alphabet can be extended:
WRITER = (write[1]->write[3]->WRITER)+{write[0..3]}.
The alphabet of WRITER is the set {write[0..3]}; i.e. the set{write[0],write[1],write[2],write[3]}.
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Outline
Topic 1: IntroductionGeneral BackgroundOn ConcurrencyExamplesImplementation
Topic 2: Modelling Processes with FSP - ILabelled Transition SystemsFSP: Basic ElementsSummary
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
FSP: Summary
Forms of process expression Examples
prefix action (coffee->DRINKS)guarded action (when (i == 0) beep->STOP)deterministic choice (red->COFFEE | blue->TEA)non-deterministic choice (toss->HEADS | toss->TAILS)dependent process (out[i]->BUFF)indexed choice (in[i : 0..3]->BUFF[i])
process name
{DRINKS,BUFF[i]
Topic 1: Introduction Topic 2: Modelling Processes with FSP - I
Process equation: process name = process expression
Process definition:
declarationsmain process equation,local process equation,
.
.
.local process equation,local process equation.