User Tools

Site Tools


wiki:encyclopedia:state_vector

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wiki:encyclopedia:state_vector [2026/10/16 18:02] – created afendinwiki: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 "A" and the function "f", defined as follows:
 +  
 +  Class A:
 +      val_a = <some_val>
 +  
 +  instance = A()
 +  
 +  func f(x, y):
 +      ...
 +      z = instance.val_a + ...
 +      ...
 +      return z
 +
 +The effect of changing value ''val_a'' propagates only when function ''f'' reads changed value.
 +On the diagram this connection described like that:
 +
 +<graphviz dot center 400x200>
 +digraph SV {
 +    rankdir=LR
 +    instance_a[shape=box label=A]
 +    val_a[shape=diamond fixedsize=true label="a"]
 +    f[shape=box]
 +    instance_a -> val_a -> f
 +}
 +</graphviz>
 +
wiki/encyclopedia/state_vector.1792166522.txt.gz · Last modified: by afendin