Dining philosophers

Introduction

To test the model-checking performance of PLASMA we created increasingly complex models based on the probabilistic dining philosophers of (Pnueli, Zuck 1986). Especially we used this range of model for our IGRIDA distributed experimentation. Results of this experimentation can be found here. Here is the model for the case of 3 philosophers. You can download a Plasma Lab project file containing models and a liveness property for 3 philosophers to 300 philosophers.

Automata modelling a philosopher


Model

Download : Philosophers.plasma


Requirement

We checked a property saying “fatally one of the philosophers will be hungry and after that, fatally, one of the philosophers will eat”.

We checked this property with the Chernoff method and parameters epsilon = 0.001, delta = 0.01. With these parameters Plasma Lab will check the property with a confidence of 99% and a precision of 0.1%.
We used this model to benchmark Plasma Lab and compare it against others Statistical Model Checking tools. The results are given below.

#Philosophers Time (s)
3 6.27
10 16.629
30 89.100
100 724.944
300 4347.504

Comparison between PRISM Numerical Analysis and Plasma Lab. Time(ms) against number of philosophers.


Importance splitting

We experiment the importance splitting algorithm on this example. We consider the model with 150 philosophers and we estimate the probability that a given philosopher will eat within 30 steps. This property Latex formula can be decomposed into 5 sub-properties that the philosopher must satisfy before satisfying Latex formula:Phil2-2

      • Latex formula
  • Latex formula
  • Latex formula
  • Latex formula
  • Latex formula
  • Latex formula

 

 

 

 

We first consider the following observer to compute a score function for this model:

This score function increase the score each time a new sub-property is satisfied. It is adequate to be used with the fixed level algorithm.

We then refine the observer such that the score also takes into account the time at which a new level is satisfied  (using the clock c). It is such that the score is between Latex formula is satisfied, between Latex formula is satisfied, etc… When the score becomes higher than 4 the property Latex formula is satisfied. This observer is optimized for the adaptive algorithm.

The model with the observer can be downloaded here.

Comments are closed.