(** Auxiliary for the compilation of [switch] statements. *)

Definition tr_jumptable (nexits: list node) (tbl: list nat) (ttbl: list node) : Prop :=
  forall v act,
  list_nth_z tbl v = Some act ->
  exists n, list_nth_z ttbl v = Some n /\ nth_error nexits act = Some n.

Lemma transl_expr_charact: forall a map rd nd s ns s' pr INCR (TR: transl_expr map a rd nd s = OK ns s' INCR) (WF: map_valid map s) (OK: target_reg_ok map pr a rd) (VALID: regs_valid pr s) (VALID2: reg_valid rd s), tr_expr s'.(st_code) map pr a ns nd rd None with transl_exprlist_charact: forall al map rl nd s ns s' pr INCR (TR: transl_exprlist map al rl nd s = OK ns s' INCR) (WF: map_valid map s) (OK: target_regs_ok map pr al rl) (VALID1: regs_valid pr s) (VALID2: regs_valid rl s), tr_exprlist s'.(st_code) map pr al ns nd rl with transl_condexpr_charact: forall a map ntrue nfalse s ns s' pr INCR (TR: transl_condexpr map a ntrue nfalse s = OK ns s' INCR) (WF: map_valid map s) (VALID: regs_valid pr s), tr_condition s'.(st_code) map pr a ns ntrue nfalse.