150 likes | 169 Views
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. What is CADP?. CADP:
E N D
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
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.
caesar compiler caesar.adt compiler LOTOS language • LOTOS = Process Algebra (CCS & CSP) + Abstract Data Type Algebra (ACT-ONE)
PUSH POP PUSH POP LOTOS language process queue_behavior[PUSH , POP] (SMax:Nat, Q: Queue) : noexit := [getCurrentSize(Q)<SMax] -> PUSH; queue_behavior[PUSH , POP] (SMax,Push(Q)) [] [getCurrentSize(Q)>0] -> POP; queue_behavior[PUSH , POP] (SMax,Pop(Q)) endproc PUSH POP bcg format
memory TO_MEM FROM_MEM Physical queue LOTOS language memory.bcg = generation of memory.lotos; phys_queue.bcg = generation of phys_queue.lotos; system.bcg = memory.bcg |[TO_MEM, FROM_MEM]| phys_queue.bcg; queue.bcg = hide TO_MEM, FROM_MEM in system.bcg PUSH POP
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)
action based time based Functional behavior: (LTS) Timed behaviour: (CTMC) PUSH rate λ IMC POP rate μ rate λ PUSH POP rate μ 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 • Composition • Concurrency • Synchronization ↓ ↓ ↓ Description of large systems && Formal verification • Performance measures • No composition, synchronization… ↓ ↓ ↓ Performance evaluation of complex systems reserved to specialists
1 model IMC Functional verification Performance evaluation Hiding of Markovian transitions and minimization Hiding of Interactive transitions and stochastic minimization LTS CTMC IMC formalism • Interactive transitions • Synchronization • Composition • Markovian transitions • Represent delays
Identifying the start and end of relevant timing delays in the model Exposing each start and end as LOTOS gates Identifying the distribution of the delay Approximating the delays as CTMC Embedding each delay into start/end gates 1 2 3 4 5 From LOTOS to Markov chains Performance evaluation with LOTOS/CADP : • Introduction of Markov transitions in LOTOS models. ≈ Introduction of delays in LOTOS models. => Generation of an Interactive Markov Chain (IMC)
Time needed to process a PUSH (λ) • Time needed to process a POP (μ) • Time between 2 PUSH (δ1) • Time between 2 POP (δ2) Identifying the start and end of relevant timing delays in the model Proba 1 RQ RSP RQ RSP 1 PUSH Exposing each start and end as LOTOS gates time POP RQ RSP RQ RSP RQ RSP 2 time 0 Identifying the distribution of the delays ENVIRONMENT ENVIRONMENT SYSTEM 3 Approximating the delays as CTMC 4 λ_START μ_START λ_STOP μ_STOP Embedding each delay into start/end gates δ1_START δ1_STOP δ2_STOP POP_DELAY PUSH_DELAY δ2_START PUSH_DELAY […] : λ_START; λ_DELAY; λ_DELAY; λ_STOP; PUSH_DELAY […] POP_DELAY […] : μ_START; μ_DELAY; μ_DELAY; μ_STOP; POP_DELAY […] 5 CONS_DELAY […] : δ2_START; δ2_DELAY; δ2_STOP; CONS_DELAY […] GEN_DELAY […] : δ1_START; δ1_DELAY; δ1_STOP; GEN_DELAY […] GEN_DELAY CONS_DELAY From LOTOS to Markov chains- example - GENERATOR CONSUMER GENERATOR […] : δ1_START; δ1_STOP; PUSH_RQ !DATA; PUSH_RSP; GENERATOR […] CONSUMER […] : δ2_START; δ2_STOP; POP_RQ; POP_RSP ?Elmt; CONSUMER […] PUSH_RQ QUEUE [ PUSH_RQ, PUSH_RSP, POP_RQ, POP_RSP,] QUEUE [ PUSH_RQ, PUSH_RSP, POP_RQ, POP_RSP, λ_START, λ_STOP, μ_START, μ_STOP ] POP_RQ PUSH_RSP POP_RSP
Identifying the start and end of relevant timing delays in the model Exposing each start and end as LOTOS gates Identifying the distribution of the delay Approximating the delays as CTMC Embedding each delay into start/end gates 1 2 3 4 5 From LOTOS to Markov chains Performance evaluation with LOTOS/CADP : • Introduction of Markov transitions in LOTOS models. ≈ Introduction of delays in LOTOS models. => 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.
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
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
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 ?