Definition modifiedvars (c: statement) (id: ident) :=
isSome ((modifiedvars' c idset0) ! id).
Definition type_of_global (ge: Clight.genv) (b: block) : option type :=
match Genv.find_var_info ge b with
| Some gv => Some gv.(gvar_info)
| None =>
match Genv.find_funct_ptr ge b with
| Some fd => Some(type_of_fundef fd)
| None => None
end
end.
Definition filter_genv (ge: Clight.genv) : genviron :=
Genv.find_symbol ge.
Definition make_tenv (te : Clight.temp_env) : tenviron := fun id => PTree.get id te.
Definition make_venv (te : Clight.env) : venviron := fun id => PTree.get id te.
Definition construct_rho ge ve te:= mkEnviron ge (make_venv ve) (make_tenv te) .
Definition empty_environ (ge: Clight.genv) := mkEnviron (filter_genv ge) (Map.empty _) (Map.empty _).
(** Definitions related to function specifications and return assertions **)
Inductive exitkind : Type := EK_normal | EK_break | EK_continue | EK_return.
Instance EqDec_exitkind: EqDec exitkind.
Definition sub_option {A} (x y: option A) :=
match x with Some x' => y = Some x' | None => True end.

Lemma sub_option_refl: forall {A} (x: option A), sub_option x x.