anchor.diff:        let ae = 
           match ae with 
           | AEApply (x, es, [t], [et]) -> AEOp (Update, es, t, et)
  -        | _ -> err ("expect apply expression") in
  +        | _ -> err ("'Update' should be converted to 'EApply' first before typecheckings") in
         ([t], ae, s)
       | EOp (Cond, [e1; e2; e3]) -> 
         let tv = next_type_var() in
  
positive.code:       let et = match expected_typ with | None -> t | Some t -> t 
        ([t], AEInt (i, t, et), [])
      | EReal r -> 
        let t = TName (Id "Real") in
        let et = match expected_typ with | None -> t | Some t -> t 
        ([t], AEReal (r, t, et), [])
      | EBitVector (n, i) ->
        let t = TName (Id "Bitvector") in
        ([t], AEBitVector (n, i, t), [])
      | EBool b -> 
        let t = TName (Id "Bool") in
        let et = match expected_typ with | None -> t | Some t -> t 
        ([t], AEBool (b, t, et), [])
      | EString s -> 
        let t = TName (Id "String") in
        ([t], AEString (s, t), [])
      | EOp (Uop UConst, [e]) ->
        let tv = next_type_var() in
  
negative.code:     ECast((subst_exp env s ae), t)
  
  let tc_exp (env:env) (e:exp) (et: typ option): (typ list * exp) = 
    try
      let (ts, ae, cl) = infer_exp env e et in
      let s = unify env Map.empty cl in
      let ts = List.map (fun t-> substitute env s t) ts in
      let es = subst_exp env s ae in
      (ts, es)
    with err -> (match locs_of_exp e with [] -> raise err | loc::_ -> raise (LocErr (loc, err)))
  
  let rec update_env_stmt (env:env) (s:stmt): env =
    match s with
  