SpecVer:O projekcie: Różnice pomiędzy wersjami
(Nie pokazano 5 pośrednich wersji utworzonych przez tego samego użytkownika) | |||
Linia 1: | Linia 1: | ||
− | To jest formuła <math>\alpha \ | + | <big>Obecna wersja tej strony to szkicownik brulion do ćwiczeń. Nie ma nic wspólnego z docelową treścią tego artykułu.</big> |
− | opisująca poprawność algorytmu K względem warunku poczatkowego <math>\alpha </math> | + | |
− | i warunku końcowego <math> \beta </math>. | + | {{Witaj}} |
+ | |||
+ | |||
+ | To jest formuła <math>\color{red}\alpha\Rightarrow K\,\beta </math> | ||
+ | opisująca poprawność algorytmu K względem warunku poczatkowego <math>\color{blue}\alpha </math> | ||
+ | i warunku końcowego <math> \color{blue}\beta </math>. | ||
Próba | Próba | ||
Linia 23: | Linia 28: | ||
Jeśli założenia o programie <math>M</math> odziedziczy program <math>K</math>, to mamy wtedy | Jeśli założenia o programie <math>M</math> odziedziczy program <math>K</math>, to mamy wtedy | ||
taką tautologię | taką tautologię | ||
− | <center><math>S: \left \{ \begin{array}{l} | + | <center><math>S: \left \{ \begin{array}{l} \color{red} P:\color{black} \delta:=true; n1:=n; \\ |
− | + | \color{red} M: \color{black} \left ( \begin{array}{l} | |
\mathbf{if}\ \delta\ \mathbf{then}\ K\ \mathbf{fi} | \mathbf{if}\ \delta\ \mathbf{then}\ K\ \mathbf{fi} | ||
\end{array} \right )^i | \end{array} \right )^i | ||
\end{array} \right \}\alpha \implies | \end{array} \right \}\alpha \implies | ||
S^2: \left \{ \begin{array}{l} P: \delta:=true; n1:=n; \\ | S^2: \left \{ \begin{array}{l} P: \delta:=true; n1:=n; \\ | ||
− | + | \color{red} M: \color{black} \left ( \begin{array}{l} | |
\mathbf{if}\ \delta\ \mathbf{then}\ K\ \mathbf{fi} | \mathbf{if}\ \delta\ \mathbf{then}\ K\ \mathbf{fi} | ||
\end{array} \right )^i ; \\ | \end{array} \right )^i ; \\ | ||
P: \delta:=true; n1:=n; \\ | P: \delta:=true; n1:=n; \\ | ||
− | + | \color{red} M: \color{black} \left ( \begin{array}{l} | |
\mathbf{if}\ \delta\ \mathbf{then}\ K\ \mathbf{fi} | \mathbf{if}\ \delta\ \mathbf{then}\ K\ \mathbf{fi} | ||
\end{array} \right )^i | \end{array} \right )^i | ||
Linia 92: | Linia 97: | ||
− | + | ||
+ | \color{black} |
Aktualna wersja na dzień 18:34, 13 mar 2013
Obecna wersja tej strony to szkicownik brulion do ćwiczeń. Nie ma nic wspólnego z docelową treścią tego artykułu.
Witaj na stronach projektu LEM!
To jest formuła α⇒Kβ
Próba
(αβ)
Zacznijmy od tego, że jest tautologią każda formuła o następujacym schemacie
Sα⟹Sα
Niech program P składa się z dwu instukcji P:δ:=true;n1:=n
Jeśli założenia o programie M
Tak, tak, prawdę mówił Maciej stary...
I większa formuła
\begin{array}{l} S: \left \{ \begin{array}{l} \color{red}P: \color{black}\delta:=true; n1:=n; \\
\color{red} M:\color{black} \left ( \begin{array}{l}
\mathbf{if} \ \delta\\
\mathbf{then} \\
\quad K\\ \mathbf{fi}
\end{array} \right )^i
\end{array} \color{black} \right \}\alpha \implies
S^2: \left \{ \begin{array}{l} \color{red}P: \color{black}\delta:=true; n1:=n; \\
\color{red} M:\color{black} \left ( \begin{array}{l}
\mathbf{if} \ \delta\\
\mathbf{then} \\
\quad K\\ \mathbf{fi}
\end{array} \right )^i ; \\
\color{red}P: \color{black}\delta:=true; n1:=n; \\
\color{red} M:\color{black} \left ( \begin{array}{l}
\mathbf{if} \ \delta\\
\mathbf{then} \\
\quad K\\ \mathbf{fi}
\end{array} \right )^i
\end{array} \color{black} \right \}\alpha \end{array}
popatrzmy
var T: arrayof Traverser;{unit Traverser: coroutine(n:node);var kolejny: integer;|unit traverse: procedure(m: node);beginif m≠nonethen call traverse(m.left); kolejny:=m.val; detach; (∗ instrukcja detach wznawia wspolprogram w, ktory ostatnio uaktywnil ten(this) obiekt Traverser wykonujac attach(.) ∗) call traverse(m.right);fiend traverse;beginreturn;call traverse(n)end Traverser;
\color{black}