What is CADP?

Presentation of the CADP toolbox
CADP toolbox
What is CADP ?
LOTOS language
Tools for functional verification
CADP extended for performance evaluation
IMC formalism
From LOTOS to Markov chain
From LOTOS to Markov chain – example Tools for performance evaluation
Leiden Workshop
20/06/2007
0
What is CADP?
CADP:
« Construction and Analysis of Distributed Processes »
Developped at INRIA Rhônes-Alpes (France) by the VASY
team
Toolbox for the design of communication protocols and
distributed systems.
Leiden Workshop
20/06/2007
1
LOTOS language
LOTOS =
Process Algebra (CCS & CSP)
caesar compiler
+
Abstract Data Type Algebra (ACT-ONE)
caesar.adt compiler
Leiden Workshop
20/06/2007
2
LOTOS language
process queue_behavior [PUSH , POP]
(SMax:Nat, Q: Queue) : noexit :=
PUSH
[getCurrentSize(Q)<SMax] ->
PUSH
PUSH;
POP
queue_behavior[PUSH , POP] (SMax,Push(Q))
[]
POP
PUSH
[getCurrentSize(Q)>0] ->
POP;
POP
queue_behavior[PUSH
, POP] (SMax,Pop(Q))
endproc
bcg format
Leiden Workshop
20/06/2007
3
LOTOS language
memory
memory.bcg = generation of memory.lotos;
phys_queue.bcg = generation of phys_queue.lotos;
PUSH
TO_MEM
system.bcg =
memory.bcg
|[TO_MEM, FROM_MEM]|
phys_queue.bcg;
FROM_MEM
POP
Physical
queue.bcg = hide TO_MEM, FROM_MEM in system.bcg
queue
Leiden Workshop
20/06/2007
4
Tools for functional verification
Model checking on the LTS
Various temporal logics and mu-calculus (evaluator, XTL)
Equivalence checking
Minimization and comparisons modulo bisimulations
relations
(bcg_min, bisimulator)
Simulation & co-simulation
Visual checking (bcg_edit)
Step-by-step simulation (ocis)
C simulator (caesar –simulator)
Leiden Workshop
20/06/2007
5
IMC formalism
The behavior of a physical system can often be represented by :
All the states the system may occupy
How the system move from one state to another
Functional behavior: (LTS)
Composition
Concurrency
Synchronization
PUSH
↓↓↓
POP
PUSH
Description
of large
systems
&& Formal
POP verification
Leiden Workshop
action based
time based
Timed behaviour: (CTMC)
IMC
Performance
measures
No composition,
synchronization…
rate λ
rate λ
rate μ
↓↓↓
Performance evaluation
of complex systems
reserved to
rate μ
specialists
20/06/2007
6
IMC formalism
1 model
Interactive transitions
Markovian transitions
Synchronization
Composition
Functional
verification
Hiding of Markovian transitions
and minimization
LTS
Leiden Workshop
Represent delays
IMC
Performance
evaluation
Hiding of Interactive transitions
and stochastic minimization
CTMC
20/06/2007
7
From LOTOS to Markov chains
Performance evaluation with LOTOS/CADP :
Introduction of Markov transitions in LOTOS models.
≈ Introduction of delays in LOTOS models.
Identifying the start
and end of relevant
timing delays in the
model
Exposing each start
and end as LOTOS
gates
1
2
Identifying the
distribution of the
delay
Approximating the
delays as CTMC
3
Embedding each
delay into start/end
gates
4
5
=> Generation of an Interactive Markov Chain (IMC)
Leiden Workshop
20/06/2007
8
From LOTOS to Markov chains
- example Time needed to process a PUSH
Time needed to process a POP
Identifying the start and
end of relevant timing
delays in the model
(λ)
(μ)
Time between 2 PUSH
Time between 2 POP
Proba
1
RQ
1
RSP
RQ
(δ1)
(δ2)
RSP
PUSH
time
Exposing each start and
end as LOTOS gates
POP
2
RQ RSP
time
RQ RSP
RQ RSP
0
GENERATOR
PUSH_RSP
δ1_START
GEN_DELAY […] :
δ1_START;
Leiden Workshop
PUSH_DELAY […] :
λ_START;
λ_DELAY;
δ1_DELAY;
δ1_STOP;
GEN_DELAY […]
PUSH_DELAY
GEN_DELAY
λ_DELAY;
λ_STOP;
PUSH_DELAY […]
CONSUMER
POP_RSP
POP_DELAY
POP_DELAY […] :
μ_START;
μ_DELAY;
μ_DELAY;
δ2_STOP
5
δ1_STOP
Embedding each delay
into start/end gates
CONSUMER […] :
δ2_START;
δ2_STOP;
POP_RQ;
POP_RSP ?Elmt;
CONSUMER […]
POP_RQ
μ_START
4
QUEUE
[ PUSH_RQ, PUSH_RSP,
POP_RQ,
POP_RQ, POP_RSP,]
POP_RSP,
λ_START, λ_STOP,
μ_START, μ_STOP ]
δ2_START
PUSH_RQ
λ_START
Approximating the
delays as CTMC
GENERATOR […] :
δ1_START;
δ1_STOP;
PUSH_RQ !DATA;
PUSH_RSP;
GENERATOR […]
ENVIRONMENT
SYSTEM
μ_STOP
3
ENVIRONMENT
λ_STOP
Identifying the
distribution of the delays
CONS_DELAY […] :
δ2_START;
δ2_DELAY;
μ_STOP;
POP_DELAY […]
δ2_STOP;
CONS_DELAY […]
CONS_DELAY
20/06/2007
9
From LOTOS to Markov chains
Performance evaluation with LOTOS/CADP :
Introduction of Markov transitions in LOTOS models.
≈ Introduction of delays in LOTOS models.
Identifying the start
and end of relevant
timing delays in the
model
Exposing each start
and end as LOTOS
gates
1
2
Identifying the
distribution of the
delay
Approximating the
delays as CTMC
3
Embedding each
delay into start/end
gates
4
5
=> Generation of an Interactive Markov Chain (IMC)
Hiding of the non-Markovian transition and minimisation
=> generation of a Markov Chain (CTMC)
Performance evaluation based on the analysis of these CTMC.
Leiden Workshop
20/06/2007
10
Tools for performance evaluation
Stochastic minimization (bcg_min)
Based on the maximum progress rule
=> generation of a Markov Chain (CTMC)
Performance evaluation based on the analysis of a CTMC.
Transient state probabilities (bcg_transient)
Steady state probabilities (bcg_steady)
Throughput results (-thr option)
Use of the state probabilities for more complex measures
Weighted sum of the state probabilities
Mean queue length
Mean time before failure
…
API in CADP for graph exploration for this kind of computation
Leiden Workshop
20/06/2007
11
Summary : performance evaluation
my_model_with_start_and_stop_delay_gates.bcg =
generation of my_model_with_start_and_stop_delay_gates.lotos;
my_delay1.bcg = generation of my_delay1.lotos;
…
my_delayN.bcg = generation of my_delayN.lotos;
my_imc.bcg =
( ( ( my_model_with_start_and_stop_delay_gates.bcg
|[DL1_START, DL1_STOP]|
my_delay1.bcg
)
|[...]|
…
)
|[DLN_START, DLN_STOP]|
my_delayN.bcg
);
my_mc.bcg = stochastic reduction of hide …. in my_imc.bcg
%bcg_steady –sol my_mc.sol my_mc.bcg
Leiden Workshop
20/06/2007
12
Conclusion
More information at :
http://www.inrialpes.fr/vasy/cadp/
free of charge for universities and public research centers
Toolbox written in C and available for:
Solaris
Linux
Windows
MacOS
Questions ?
Leiden Workshop
20/06/2007
13