зеркало из https://github.com/microsoft/ivy.git
32 строки
270 B
Plaintext
32 строки
270 B
Plaintext
|
#lang ivy1.7
|
||
|
|
||
|
type t
|
||
|
var p(X:t) : bool
|
||
|
var q : bool
|
||
|
|
||
|
var y : t
|
||
|
|
||
|
after init {
|
||
|
p(X) := true
|
||
|
}
|
||
|
|
||
|
action b(x:t) = {
|
||
|
p(x) := false
|
||
|
}
|
||
|
|
||
|
action a = {
|
||
|
q := *;
|
||
|
while q
|
||
|
invariant p(X)
|
||
|
{
|
||
|
var x : t;
|
||
|
call b(x)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
invariant p(X)
|
||
|
|
||
|
|
||
|
export a
|
||
|
|