編譯器
軟體路由
Can this program stop?
a=0
: initial valuea<10
: stop conditiona++
: step\[ \frac{}{ \{P\}{\epsilon}\{P\} }{Empty\;statement\;axiom} \]
\[ \frac{}{\{P[E/x]\} x := E\{P\}}{Assignment\;axiom} \]
\[ \frac{\{P\}{S}\{Q\}, \{Q\}{T}\{R\}} {\{P\}{S;T}\{R\}} {Rule\;of\;composition} \]
\[ \frac{\{B \land P\}{S}\{Q\}, \{\lnot B \land P \}{T}\{Q\}} {\{P\}{if \; B \; then \; S \; else \; T}\{Q\}} {Conditional\;rule} \]
\[ \frac{ P_1 \to P_2, \{P_2\}S\{Q_2\}, Q_2 \to Q_1 }{ \{P_1\}S\{Q_1\} }{Consequence \; rule} \]
\[ \frac{ \{P \land B\} S \{P\} }{ \{P\} while \; B \; do \; S \; done \{\lnot B \land P\} }{While \; rule} \]
[]
is the 0
(base case)x :: xs
is S 0
(induction case)You can find me on