(** Builtin arguments. *)

(* Specifications: *)
Lemma eval_exprlist_append:
forall le al1 vl1 al2 vl2,
eval_exprlist ge sp e m le (exprlist_of_expr_list al1) vl1 ->
eval_exprlist ge sp e m le (exprlist_of_expr_list al2) vl2 ->
eval_exprlist ge sp e m le (exprlist_of_expr_list (al1 ++ al2)) (vl1 ++ vl2).
Lemma invert_eval_builtin_arg:
forall a v,
eval_builtin_arg ge sp e m a v ->
exists vl,
eval_exprlist ge sp e m nil (exprlist_of_expr_list (params_of_builtin_arg a)) vl
/\ Events.eval_builtin_arg ge (fun v => v) sp m (fst (convert_builtin_arg a vl)) v
/\ (forall vl', convert_builtin_arg a (vl ++ vl') = (fst (convert_builtin_arg a vl), vl')).
Lemma invert_eval_builtin_args:
forall al vl,
list_forall2 (eval_builtin_arg ge sp e m) al vl ->
exists vl',
eval_exprlist ge sp e m nil (exprlist_of_expr_list (params_of_builtin_args al)) vl'
/\ Events.eval_builtin_args ge (fun v => v) sp m (convert_builtin_args al vl') vl.
Lemma transl_eval_builtin_arg:
forall rs a vl rl v,
Val.lessdef_list vl rs##rl ->
Events.eval_builtin_arg ge (fun v => v) sp m (fst (convert_builtin_arg a vl)) v ->
exists v',
Events.eval_builtin_arg ge (fun r => rs#r) sp m (fst (convert_builtin_arg a rl)) v'
/\ Val.lessdef v v'
/\ Val.lessdef_list (snd (convert_builtin_arg a vl)) rs##(snd (convert_builtin_arg a rl)).
Lemma transl_eval_builtin_args:
forall rs al vl1 rl vl,
Val.lessdef_list vl1 rs##rl ->
Events.eval_builtin_args ge (fun v => v) sp m (convert_builtin_args al vl1) vl ->
exists vl',
Events.eval_builtin_args ge (fun r => rs#r) sp m (convert_builtin_args al rl) vl'
/\ Val.lessdef_list vl vl'.