(** * Correctness of Csharpminor construction functions *)
Section CONSTRUCTORS.
Variable ge: genv.

(* Specifications: *)
Lemma make_intconst_correct:
forall n e le m,
eval_expr ge e le m (make_intconst n) (Vint n).
Lemma make_floatconst_correct:
forall n e le m,
eval_expr ge e le m (make_floatconst n) (Vfloat n).
Lemma make_longconst_correct:
forall n e le m,
eval_expr ge e le m (make_longconst n) (Vlong n).
Lemma make_floatofint_correct:
forall a n sg sz e le m,
eval_expr ge e le m a (Vint n) ->
eval_expr ge e le m (make_floatofint a sg sz) (Vfloat(cast_int_float sg sz n)).
Lemma make_intoffloat_correct:
forall e le m a sg f i,
eval_expr ge e le m a (Vfloat f) ->
cast_float_int sg f = Some i ->
eval_expr ge e le m (make_intoffloat a sg) (Vint i).
Lemma make_longofint_correct:
forall a n sg e le m,
eval_expr ge e le m a (Vint n) ->
eval_expr ge e le m (make_longofint a sg) (Vlong(cast_int_long sg n)).
Lemma make_floatoflong_correct:
forall a n sg sz e le m,
eval_expr ge e le m a (Vlong n) ->
eval_expr ge e le m (make_floatoflong a sg sz) (Vfloat(cast_long_float sg sz n)).
Lemma make_longoffloat_correct:
forall e le m a sg f i,
eval_expr ge e le m a (Vfloat f) ->
cast_float_long sg f = Some i ->
eval_expr ge e le m (make_longoffloat a sg) (Vlong i).