Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Both sides next revision | ||
alvis:modelstate [2017/01/11 22:44] marcin removed | — (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Model state ====== | ||
- | {{ : | ||
- | |||
- | |||
- | **Definition 1.** A **state** of a model $\mathbf{A} = (D, B, \alpha^0)$, where $D = (A, C, \sigma)$ and $A = \{X_1, | ||
- | |||
- | $$S = (S(X_1), | ||
- | |||
- | **Definition 2.** The **initial state** is defined as follows: | ||
- | * $am(X) = \mathsf{X}$, | ||
- | * $am(X) = \mathsf{I}$, | ||
- | * $am(X) = \mathsf{W}$, | ||
- | * $pc(X) = 1$ for any active agent $X$ in the **running** mode and $pc(X) = 0$ for other agents. | ||
- | * $ci(X) = [\; ]$ for any active agent $X$. | ||
- | * $ci(X)$ contains names of all accessible procedures of $X$ together with the direction of parameters transfer, e.g. $in(a)$, $out(b)$, etc. for any passive agent $X$. | ||
- | * For any agent $X$, $pv(X)$ contains $X$ parameters with their initial values. | ||
- | |||
- | **Example: Sender-Buffer-Receiver system** | ||
- | |||
- | {{ : | ||
- | |||
- | < | ||
- | agent Sender { | ||
- | loop { -- 1 | ||
- | out put; -- 2 | ||
- | } | ||
- | } | ||
- | |||
- | agent Buffer { | ||
- | i :: Int = 0; | ||
- | proc (i == 0) put { | ||
- | in put; -- 1 | ||
- | i = 1; -- 2 | ||
- | } | ||
- | proc (i /= 0) get { | ||
- | out get; -- 3 | ||
- | i = 0; -- 4 | ||
- | } | ||
- | } | ||
- | |||
- | agent Receiver { | ||
- | loop { -- 1 | ||
- | in get; -- 2 | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | |||
- | **Initial state:** | ||
- | S_0 = ((X, | ||
- | |||
- | **See also: [[: | ||
- | |||
- | **[[: |