In this class we will translate a [[Simple Programming Language|SPL]] programm to [[Fair Transition Systems|FTS]] [[Deterministic Finite State Automata|Automata]].
Used in two ways:
- identifying instructions
- localize where the control pointer is
Note
multiple labels can define the same place of the control pointer
We create a [[Equivalence Relation]] that allows us to identify labels that are associated with the same location.
This means that
![[Verification 17_image_1.png]]
As a description from above
- case
$l \sim l_1$ and only to$l_1$ -> this is a concatination - case
$l \sim l_1 \sim l_2 \sim ....\sim l_k$ this is a conditional -
$l \sim l_1$ and only to$l_1$ -> this is a assignment -> local declaration does not
How does this look for our example of the GCD: ![[Verification 17_image_2.png]]
![[Verification 17_image_3.png]]
How does the
- we have
$l_2$ is infront of a conditonal (case 2) - then we have a concatination (case 1),
$l_2$ is equal to the first command of the concatination
Is an instruction executed, a new location is reached. This location is called [[Post-location]].
Example: ![[Verification 17_image_4.png]]
The [[Post-location]] of this instruction
i.e.
Other examples:
![[Verification 17_image_5.png]]
How does it look with our GCD example?
![[Verification 17_image_6.png]]
If
![[Verification 17_image_7.png]]
Example for [[Ancestor relation|LCA]]:
![[Verification 17_image_8.png]]
==What does this mean==: Looking at the [[Ancestor relation|LCA]] we can see if the instructions can be executed in parallel or need to be executed one after another.
When can we execute two instructions in parallel?
[!note] parallel instructions If
$S_i$ and$S_j$ have a cooperation instruction ($||$ ) S, where$S_i \neq S_j$ and$S_j \neq S$ and$S_i \neq S$ then they are parallel instructions and we can execute them in parallel. Otherwise we call them instructions in conflict
Example: ![[Verification 17_image_9.png]]
The [[semantics]] of an [[Simple Programming Language|SPL]] program are simmilar to an [[Fair Transition Systems|FTS]]:
The control variable saves the location of the control during execution.
The domain of
The value of
==Special case== Asynchronous channel: For every asynchronous channel one gets one variable for storing the variable written to the channel. Synchronous channel: There is no need of an additonal variable as the value is written and read at the same time.
Notation:
The intial condition consist of the conditions for the input variables (in this case
The conditions are:
$a>0$ $b>0$ $y_1=a$ $y_2=b$ $\pi={[l_1]}$
![[Verification 17_image_10.png]]
- The set of transitions has also the ideling transition
$\mathcal{T_I}$ which does not move the change any of the variables. - All transitions are [[self-disabling]] meaning that at least the control variable is changed.
Abbreviations: ![[Verification 17_image_11.png]]
==$pres$ stands for preserve==
$\rho_l:move(l,\hat{l}) \land pres(Y)$
explenation: it moves the control location from $l$ to $l'$ but preserves all other variables
$\rho_l: move(l,\hat{l}) \land \bar{u'}= \bar{e} \land pres(y-{\hat{u}})$
explenation: it moves the control location, assignes $e$ to the value of $u$. All variables are preserved, except $u$.
-
$\rho_l: move(l,\hat{l}) \land c \land pres(Y)$ explenation: when c is true the entire statement gets true and executed. if c is not true the statement cant be true.
-
$\cdot$ is the concationation operation
![[Verification 17_image_12.png]]
explanation: we move the control in the two processes from l to
![[Verification 17_image_13.png]]
![[Verification 17_image_14.png]]
$\rho_l:move(l,\hat{l}) \land pres(Y)$
$\rho_l:move(l,\hat{l}) \land pres(Y)$
critical and noncrital look the same but they have different termination conditons.
![[Verification 17_image_15.png]]
![[Verification 17_image_16.png]]
![[Verification 17_image_17.png]]
It is implemented by having two subformulas
![[Verification 17_image_18.png]]
In the cooperation instruction we model first the entry step