wiki:encyclopedia:state_vector
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| wiki:encyclopedia:state_vector [2026/10/16 18:02] – created afendin | wiki:encyclopedia:state_vector [2026/10/31 07:52] (current) – krosenmann | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| The state of a process is the step it is currently on, together with the values of those of its variables that can be read from outside. Unlike a message in a [[data_stream_vector|data stream]], the state can be read any number of times and stays the same until its owner changes it. In the clerk model, this is a sign on a clerk’s desk that other clerks can look at. We draw it as a diamond. | The state of a process is the step it is currently on, together with the values of those of its variables that can be read from outside. Unlike a message in a [[data_stream_vector|data stream]], the state can be read any number of times and stays the same until its owner changes it. In the clerk model, this is a sign on a clerk’s desk that other clerks can look at. We draw it as a diamond. | ||
| + | |||
| + | ===== Example ===== | ||
| + | |||
| + | Program has two entities, the instance of some class " | ||
| + | | ||
| + | Class A: | ||
| + | val_a = < | ||
| + | | ||
| + | instance = A() | ||
| + | | ||
| + | func f(x, y): | ||
| + | ... | ||
| + | z = instance.val_a + ... | ||
| + | ... | ||
| + | return z | ||
| + | |||
| + | The effect of changing value '' | ||
| + | On the diagram this connection described like that: | ||
| + | |||
| + | < | ||
| + | digraph SV { | ||
| + | rankdir=LR | ||
| + | instance_a[shape=box label=A] | ||
| + | val_a[shape=diamond fixedsize=true label=" | ||
| + | f[shape=box] | ||
| + | instance_a -> val_a -> f | ||
| + | } | ||
| + | </ | ||
| + | |||
wiki/encyclopedia/state_vector.1792166522.txt.gz · Last modified: by afendin