free c:channel.
free d:channel [private].

free k:bitstring [private].

fun h(bitstring): bitstring.

select x:bitstring; mess(d,*x).

query attacker(k).

set verboseRules = true.

fun enc(bitstring,bitstring):bitstring.
reduc forall x,y:bitstring; dec(enc(x,y),y) = x.

process
  (in(c,x:bitstring);
  let y = dec(x,k) in
  out(d,h(y)))

  | (in(d,z:bitstring);
    in(c,z':bitstring);
    let y' = dec(z',z) in
    out(c,y'))

(*
  Without the nounif / select declaration, the fact attacker is selected instead
  of the message fact in the following clause

  Rule with hypothesis fact 0 selected: attacker(enc(y'_1,y_1))
  attacker(enc(y'_1,y_1)) && mess(d[],y_1) -> attacker(y'_1)
  18 rules inserted. Base: 18 rules (12 with conclusion selected). Queue: 1 rules.
*)

(* EXPECTPV
RESULT not attacker(k[]) is true.
0.004s (user 0.004s + system 0.000s), max rss 7228K
END *)
