[FMFP] Modelling

This commit is contained in:
2026-06-07 12:18:14 +02:00
parent 83999cc32c
commit bd50083741
7 changed files with 126 additions and 1 deletions
@@ -1,2 +1,17 @@
\subsection{Promela}
% p23
Promela has \texttt{C}-like syntax, and its main objects are processes, channels, and variables.
An important consideration always is the number of states there are for each model, if spin can complete executing.
The number of states is given by
\[
\prod_{i = 1}^N (l(p_i) \times \prod_{\texttt{var} x_i \in p_i} |\texttt{dom}(x_i)|) \times \prod_{j = 1}^{K} |\texttt{dom}(c_j)|^{\texttt{cap}(c_j)}
\]
where $l(p_i)$ returns the number of program locations for process $i$, $|\texttt{dom}(x_i)|$ denotes the number of values a variable can take,
$\texttt{dom}(c_j)$ denotes the number of values each message in the channel can take and $\texttt{cap}(c_j)$ returns the capacity of the buffer fo the channel.
\shade{orange}{THUS:} \hl{Keep the model as small as possible} to prevent the above, which is called \bi{state space explosion}
\newpage
\inputcode{promela}{code/promela/00_basics.pml}