free c:channel.

fun h(bitstring):bitstring.

const a,b:bitstring.

event A(bitstring).

const ok,ko:bitstring.

lemma x:bitstring,y:bitstring; event(A(x)) ==> x=a.


query x:bitstring; event(A(x)).

process
  in(c,x:bitstring);
  if x = a
  then
    event A(a);
    out(c,ok)
  else
    out(c,ko)

(* EXPECTPV
RESULT event(A(x_1)) ==> x_1 = a is true.
RESULT not event(A(x_1)) is false.
0.012s (user 0.004s + system 0.008s), max rss 8068K
END *)
