Section CalculatorApp.
Definition l1 := 1.
Definition l2 := 2.
Definition f args :=
match args with
| x::y::_ => Some (x + y)
| _ => None
end.
Definition prec (args : input) :=
if args is x::y::_ then true else false.
(* This server node *)
Definition sv : nid := 1.
Definition cl : nid := 2.
(* Delegate server *)
Definition sd := 3.
Notation loc i k := (getLocal sv (getStatelet i k)).
Notation loc1 i := (loc i l1).
Notation loc2 i := (loc i l2).
(****************************************************)
(***********        Initial state     ***************)
(****************************************************)
Definition init_loc := st :-> ([::] : reqs).
Definition init_dstate1 := sv \\-> init_loc \+ cl \\-> init_loc.
Definition init_dstate2 := sv \\-> init_loc \+ sd \\-> init_loc.

Lemma valid_init_dstate1 : valid init_dstate1.